summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/IRPrintingPasses.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-15 02:12:41 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-15 02:12:41 +0000
commitc4f0a325a7a1dde8780a740bca06705df3d7f58e (patch)
tree1542ebdb0ccae60ad9dabd78806c87f85f69ee5f /llvm/lib/IR/IRPrintingPasses.cpp
parent89010d8356507e5ed6cf6d67d8327530d01499ff (diff)
downloadbcm5719-llvm-c4f0a325a7a1dde8780a740bca06705df3d7f58e.tar.gz
bcm5719-llvm-c4f0a325a7a1dde8780a740bca06705df3d7f58e.zip
uselistorder: Pull the assembly bit up out of the printer
Pull the `-preserve-ll-uselistorder` bit up through all the callers of `Module::print()`. I converted callers of `operator<<` to `Module::print()` where necessary to pull the bit through. llvm-svn: 234968
Diffstat (limited to 'llvm/lib/IR/IRPrintingPasses.cpp')
-rw-r--r--llvm/lib/IR/IRPrintingPasses.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/IRPrintingPasses.cpp b/llvm/lib/IR/IRPrintingPasses.cpp
index 91ccfbb2f46..e872387022f 100644
--- a/llvm/lib/IR/IRPrintingPasses.cpp
+++ b/llvm/lib/IR/IRPrintingPasses.cpp
@@ -15,6 +15,7 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
+#include "llvm/IR/UseListOrder.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -25,7 +26,8 @@ PrintModulePass::PrintModulePass(raw_ostream &OS, const std::string &Banner)
: OS(OS), Banner(Banner) {}
PreservedAnalyses PrintModulePass::run(Module &M) {
- OS << Banner << M;
+ OS << Banner;
+ M.print(OS, nullptr, shouldPreserveAssemblyUseListOrder());
return PreservedAnalyses::all();
}
OpenPOWER on IntegriCloud