summaryrefslogtreecommitdiff
path: root/lib/IR/Pass.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-12 11:30:46 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-12 11:30:46 +0000
commita5ced5ed37b3a742e958506ce133387b3313fe3a (patch)
tree49fd532c2cfab7f8e7b65606d01b2e3755174340 /lib/IR/Pass.cpp
parent2ad3b87c4e1dfb8a49537ef51be5a13ea244f867 (diff)
downloadllvm-a5ced5ed37b3a742e958506ce133387b3313fe3a.tar.gz
llvm-a5ced5ed37b3a742e958506ce133387b3313fe3a.tar.bz2
llvm-a5ced5ed37b3a742e958506ce133387b3313fe3a.tar.xz
[PM] Simplify the interface exposed for IR printing passes.
Nothing was using the ability of the pass to delete the raw_ostream it printed to, and nothing was trying to pass it a pointer to the raw_ostream. Also, the function variant had a different order of arguments from all of the others which was just really confusing. Now the interface accepts a reference, doesn't offer to delete it, and uses a consistent order. The implementation of the printing passes haven't been updated with this simplification, this is just the API switch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Pass.cpp')
-rw-r--r--lib/IR/Pass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/IR/Pass.cpp b/lib/IR/Pass.cpp
index dc8eee5338..3782e2d7be 100644
--- a/lib/IR/Pass.cpp
+++ b/lib/IR/Pass.cpp
@@ -35,7 +35,7 @@ ModulePass::~ModulePass() { }
Pass *ModulePass::createPrinterPass(raw_ostream &O,
const std::string &Banner) const {
- return createPrintModulePass(&O, false, Banner);
+ return createPrintModulePass(O, Banner);
}
PassManagerType ModulePass::getPotentialPassManagerType() const {
@@ -130,7 +130,7 @@ void ImmutablePass::initializePass() {
Pass *FunctionPass::createPrinterPass(raw_ostream &O,
const std::string &Banner) const {
- return createPrintFunctionPass(Banner, &O);
+ return createPrintFunctionPass(O, Banner);
}
PassManagerType FunctionPass::getPotentialPassManagerType() const {
@@ -143,7 +143,7 @@ PassManagerType FunctionPass::getPotentialPassManagerType() const {
Pass *BasicBlockPass::createPrinterPass(raw_ostream &O,
const std::string &Banner) const {
- return createPrintBasicBlockPass(&O, false, Banner);
+ return createPrintBasicBlockPass(O, Banner);
}
bool BasicBlockPass::doInitialization(Function &) {