mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
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:
parent
dda346aa71
commit
f923129fc3
@ -1787,22 +1787,22 @@ namespace {
|
|||||||
Out << "#include <llvm/Instructions.h>\n";
|
Out << "#include <llvm/Instructions.h>\n";
|
||||||
Out << "#include <llvm/InlineAsm.h>\n";
|
Out << "#include <llvm/InlineAsm.h>\n";
|
||||||
Out << "#include <llvm/Support/MathExtras.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/Pass.h>\n";
|
||||||
Out << "#include <llvm/PassManager.h>\n";
|
Out << "#include <llvm/PassManager.h>\n";
|
||||||
Out << "#include <llvm/ADT/SmallVector.h>\n";
|
Out << "#include <llvm/ADT/SmallVector.h>\n";
|
||||||
Out << "#include <llvm/Analysis/Verifier.h>\n";
|
Out << "#include <llvm/Analysis/Verifier.h>\n";
|
||||||
Out << "#include <llvm/Assembly/PrintModulePass.h>\n";
|
Out << "#include <llvm/Assembly/PrintModulePass.h>\n";
|
||||||
Out << "#include <algorithm>\n";
|
Out << "#include <algorithm>\n";
|
||||||
Out << "#include <iostream>\n\n";
|
|
||||||
Out << "using namespace llvm;\n\n";
|
Out << "using namespace llvm;\n\n";
|
||||||
Out << "Module* " << fname << "();\n\n";
|
Out << "Module* " << fname << "();\n\n";
|
||||||
Out << "int main(int argc, char**argv) {\n";
|
Out << "int main(int argc, char**argv) {\n";
|
||||||
Out << " Module* Mod = " << fname << "();\n";
|
Out << " Module* Mod = " << fname << "();\n";
|
||||||
Out << " verifyModule(*Mod, PrintMessageAction);\n";
|
Out << " verifyModule(*Mod, PrintMessageAction);\n";
|
||||||
Out << " std::cerr.flush();\n";
|
Out << " errs().flush();\n";
|
||||||
Out << " std::cout.flush();\n";
|
Out << " outs().flush();\n";
|
||||||
Out << " PassManager PM;\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 << " PM.run(*Mod);\n";
|
||||||
Out << " return 0;\n";
|
Out << " return 0;\n";
|
||||||
Out << "}\n\n";
|
Out << "}\n\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user