diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-01-12 11:30:46 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-01-12 11:30:46 +0000 |
commit | 9d805139bdf016787c4d66619b17a2fff2c5392c (patch) | |
tree | 22e3dadb68961cff98013382789a4c3549d797a8 /llvm/tools | |
parent | 3dd261d0c94d949b75e82cd581a0b5cd50aee9b6 (diff) | |
download | bcm5719-llvm-9d805139bdf016787c4d66619b17a2fff2c5392c.tar.gz bcm5719-llvm-9d805139bdf016787c4d66619b17a2fff2c5392c.zip |
[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.
llvm-svn: 199044
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-extract/llvm-extract.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/opt/opt.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-extract/llvm-extract.cpp b/llvm/tools/llvm-extract/llvm-extract.cpp index ecea00530d9..4962151e566 100644 --- a/llvm/tools/llvm-extract/llvm-extract.cpp +++ b/llvm/tools/llvm-extract/llvm-extract.cpp @@ -272,7 +272,7 @@ int main(int argc, char **argv) { } if (OutputAssembly) - Passes.add(createPrintModulePass(&Out.os())); + Passes.add(createPrintModulePass(Out.os())); else if (Force || !CheckBitcodeOutputToConsole(Out.os(), true)) Passes.add(createBitcodeWriterPass(Out.os())); diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 44b3f13b546..92b63bd8303 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -823,7 +823,7 @@ int main(int argc, char **argv) { } if (PrintEachXForm) - Passes.add(createPrintModulePass(&errs())); + Passes.add(createPrintModulePass(errs())); } // If -std-compile-opts was specified at the end of the pass list, add them. @@ -866,7 +866,7 @@ int main(int argc, char **argv) { // Write bitcode or assembly to the output as the last step... if (!NoOutput && !AnalyzeOnly) { if (OutputAssembly) - Passes.add(createPrintModulePass(&Out->os())); + Passes.add(createPrintModulePass(Out->os())); else Passes.add(createBitcodeWriterPass(Out->os())); } |