uselistorder: Pull the bit through WriteToBitcodFile()
[oota-llvm.git] / tools / gold / gold-plugin.cpp
index 2c7bf5a64eef3b5e5f7b8185fce2d31373911309..31a9b950ce99c98c8242d1e03ecfcb7e68912543 100644 (file)
@@ -734,12 +734,13 @@ static void runLTOPasses(Module &M, TargetMachine &TM) {
   passes.run(M);
 }
 
-static void saveBCFile(StringRef Path, Module &M) {
+static void saveBCFile(StringRef Path, Module &M,
+                       bool ShouldPreserveUseListOrder) {
   std::error_code EC;
   raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
   if (EC)
     message(LDPL_FATAL, "Failed to write the output file.");
-  WriteBitcodeToFile(&M, OS);
+  WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ true);
 }
 
 static void codegen(Module &M) {