forked from OSchip/llvm-project
Update CPP backend for PrintModulePass API changes.
llvm-svn: 60690
This commit is contained in:
parent
50fcc67a8b
commit
2be8b919b1
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue