diff --git a/lib/LTO/ThinLTOCodeGenerator.cpp b/lib/LTO/ThinLTOCodeGenerator.cpp index 7c4e74e9c2b..b60668dc670 100644 --- a/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/lib/LTO/ThinLTOCodeGenerator.cpp @@ -91,7 +91,7 @@ static void saveTempBitcode(const Module &TheModule, StringRef TempDir, if (EC) report_fatal_error(Twine("Failed to open ") + SaveTempPath + " to save optimized bitcode\n"); - WriteBitcodeToFile(&TheModule, OS, true, false); + WriteBitcodeToFile(&TheModule, OS, /* ShouldPreserveUseListOrder */ true); } bool IsFirstDefinitionForLinker(const GlobalValueInfoList &GVInfo, diff --git a/tools/llvm-lto/llvm-lto.cpp b/tools/llvm-lto/llvm-lto.cpp index 1f7892de44b..ad3fb4effd4 100644 --- a/tools/llvm-lto/llvm-lto.cpp +++ b/tools/llvm-lto/llvm-lto.cpp @@ -316,7 +316,7 @@ static void writeModuleToFile(Module &TheModule, StringRef Filename) { std::error_code EC; raw_fd_ostream OS(Filename, EC, sys::fs::OpenFlags::F_None); error(EC, "error opening the file '" + Filename + "'"); - WriteBitcodeToFile(&TheModule, OS, true, false); + WriteBitcodeToFile(&TheModule, OS, /* ShouldPreserveUseListOrder */ true); } class ThinLTOProcessing {