diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter6/toy.cpp')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter6/toy.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp index 0fa128d2e55..19e25d37dcd 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp @@ -964,7 +964,8 @@ static void HandleDefinition() { 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(); } @@ -978,7 +979,8 @@ static void 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 { |