diff options
Diffstat (limited to 'llvm/docs/tutorial/LangImpl04.rst')
-rw-r--r-- | llvm/docs/tutorial/LangImpl04.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/docs/tutorial/LangImpl04.rst b/llvm/docs/tutorial/LangImpl04.rst index 78596cd8eee..513bf8f4ab4 100644 --- a/llvm/docs/tutorial/LangImpl04.rst +++ b/llvm/docs/tutorial/LangImpl04.rst @@ -458,7 +458,8 @@ We also need to update HandleDefinition and HandleExtern: if (auto FnAST = ParseDefinition()) { if (auto *FnIR = FnAST->codegen()) { fprintf(stderr, "Read function definition:"); - FnIR->dump(); + FnIR->print(errs()); + fprintf(stderr, "\n"); TheJIT->addModule(std::move(TheModule)); InitializeModuleAndPassManager(); } @@ -472,7 +473,8 @@ We also need to update HandleDefinition and HandleExtern: if (auto ProtoAST = ParseExtern()) { if (auto *FnIR = ProtoAST->codegen()) { fprintf(stderr, "Read extern: "); - FnIR->dump(); + FnIR->print(errs()); + fprintf(stderr, "\n"); FunctionProtos[ProtoAST->getName()] = std::move(ProtoAST); } } else { |