[llvm-commits] [llvm] r60690 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Dan Gohman
gohman at apple.com
Sun Dec 7 23:07:24 PST 2008
Author: djg
Date: Mon Dec 8 01:07:24 2008
New Revision: 60690
URL: http://llvm.org/viewvc/llvm-project?rev=60690&view=rev
Log:
Update CPP backend for PrintModulePass API changes.
Modified:
llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=60690&r1=60689&r2=60690&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Mon Dec 8 01:07:24 2008
@@ -1787,22 +1787,22 @@
Out << "#include <llvm/Instructions.h>\n";
Out << "#include <llvm/InlineAsm.h>\n";
Out << "#include <llvm/Support/MathExtras.h>\n";
+ Out << "#include <llvm/Support/raw_ostream.h>\n";
Out << "#include <llvm/Pass.h>\n";
Out << "#include <llvm/PassManager.h>\n";
Out << "#include <llvm/ADT/SmallVector.h>\n";
Out << "#include <llvm/Analysis/Verifier.h>\n";
Out << "#include <llvm/Assembly/PrintModulePass.h>\n";
Out << "#include <algorithm>\n";
- Out << "#include <iostream>\n\n";
Out << "using namespace llvm;\n\n";
Out << "Module* " << fname << "();\n\n";
Out << "int main(int argc, char**argv) {\n";
Out << " Module* Mod = " << fname << "();\n";
Out << " verifyModule(*Mod, PrintMessageAction);\n";
- Out << " std::cerr.flush();\n";
- Out << " std::cout.flush();\n";
+ Out << " errs().flush();\n";
+ Out << " outs().flush();\n";
Out << " PassManager PM;\n";
- Out << " PM.add(new PrintModulePass(&llvm::cout));\n";
+ Out << " PM.add(createPrintModulePass(&outs()));\n";
Out << " PM.run(*Mod);\n";
Out << " return 0;\n";
Out << "}\n\n";
More information about the llvm-commits
mailing list