summaryrefslogtreecommitdiff
path: root/tools/llvm-as
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 18:33:00 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 18:33:00 +0000
commitd044549557efc225189f2eabba83d2d02ff58ea7 (patch)
tree798b8874fcf397f62a8d5c802119d836a30f0612 /tools/llvm-as
parent8922be32e97932ac62edbd64d31212226ee20efc (diff)
IR: Set -preserve-bc-uselistorder=false by default
But keep it on by default in `llvm-as`, `opt`, `bugpoint`, `llvm-link`, `llvm-extract`, and `LTOCodeGenerator`. Part of PR5680. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-as')
-rw-r--r--tools/llvm-as/llvm-as.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index 5ccf505923f..ae8ca569fd4 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/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...