summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/OptimizerDriver.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-15 00:10:50 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-15 00:10:50 +0000
commita052ed6381f15a78e6e49a665b255234762fa15a (patch)
tree1df677ad82d7ff85ce6b3b3358aca9ad330371b4 /llvm/tools/bugpoint/OptimizerDriver.cpp
parent458593a4571dae5bcb9039ef59b47cf44ed3e3a1 (diff)
downloadbcm5719-llvm-a052ed6381f15a78e6e49a665b255234762fa15a.tar.gz
bcm5719-llvm-a052ed6381f15a78e6e49a665b255234762fa15a.zip
uselistorder: Pull the bit through WriteToBitcodFile()
Change the callers of `WriteToBitcodeFile()` to pass `true` or `shouldPreserveBitcodeUseListOrder()` explicitly. I left the callers that want to send `false` alone. I'll keep pushing the bit higher until hopefully I can delete the global `cl::opt` entirely. llvm-svn: 234957
Diffstat (limited to 'llvm/tools/bugpoint/OptimizerDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/OptimizerDriver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp
index 481f343c988..3ac263c6de9 100644
--- a/llvm/tools/bugpoint/OptimizerDriver.cpp
+++ b/llvm/tools/bugpoint/OptimizerDriver.cpp
@@ -20,6 +20,7 @@
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
+#include "llvm/IR/UseListOrder.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
@@ -55,7 +56,7 @@ namespace {
/// file. If an error occurs, true is returned.
///
static bool writeProgramToFileAux(tool_output_file &Out, const Module *M) {
- WriteBitcodeToFile(M, Out.os());
+ WriteBitcodeToFile(M, Out.os(), shouldPreserveBitcodeUseListOrder());
Out.os().close();
if (!Out.os().has_error()) {
Out.keep();
@@ -151,7 +152,7 @@ bool BugDriver::runPasses(Module *Program,
tool_output_file InFile(InputFilename, InputFD);
- WriteBitcodeToFile(Program, InFile.os());
+ WriteBitcodeToFile(Program, InFile.os(), shouldPreserveBitcodeUseListOrder());
InFile.os().close();
if (InFile.os().has_error()) {
errs() << "Error writing bitcode file: " << InputFilename << "\n";
OpenPOWER on IntegriCloud