summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 2bcdc27e965..345b2246388 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -29,6 +29,7 @@
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
+#include "llvm/IR/UseListOrder.h"
#include "llvm/IR/Verifier.h"
#include "llvm/InitializePasses.h"
#include "llvm/LTO/LTOModule.h"
@@ -603,6 +604,10 @@ void LTOCodeGenerator::setCodeGenDebugOptions(const char *options) {
}
void LTOCodeGenerator::parseCodeGenDebugOptions() {
+ // Turn on -preserve-bc-uselistorder by default, but let the command-line
+ // override it.
+ setPreserveBitcodeUseListOrder(true);
+
// if options were requested, set them
if (!CodegenOptions.empty())
cl::ParseCommandLineOptions(CodegenOptions.size(),
OpenPOWER on IntegriCloud