Update CPP backend for PrintModulePass API changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-12-08 07:07:24 +00:00
parent dda346aa71
commit f923129fc3

View File

@ -1787,22 +1787,22 @@ namespace {
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";