From a5ced5ed37b3a742e958506ce133387b3313fe3a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 12 Jan 2014 11:30:46 +0000 Subject: [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 --- tools/opt/opt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/opt/opt.cpp') diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 44b3f13b54..92b63bd830 100644 --- a/tools/opt/opt.cpp +++ b/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())); } -- cgit v1.2.3