summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-as/llvm-as.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-as/llvm-as.cpp')
-rw-r--r--llvm/tools/llvm-as/llvm-as.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-as/llvm-as.cpp b/llvm/tools/llvm-as/llvm-as.cpp
index 5ccf505923f..ae8ca569fd4 100644
--- a/llvm/tools/llvm-as/llvm-as.cpp
+++ b/llvm/tools/llvm-as/llvm-as.cpp
@@ -19,6 +19,7 @@
#include "llvm/AsmParser/Parser.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/Module.h"
+#include "llvm/IR/UseListOrder.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
@@ -90,6 +91,11 @@ int main(int argc, char **argv) {
PrettyStackTraceProgram X(argc, argv);
LLVMContext &Context = getGlobalContext();
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
+
+ // Turn on -preserve-bc-uselistorder by default, but let the command-line
+ // override it.
+ setPreserveBitcodeUseListOrder(true);
+
cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
// Parse the file now...
OpenPOWER on IntegriCloud