summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter5
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter5')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter5/toy.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
index 568ec8de5c3..795f49c847e 100644
--- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp
@@ -845,7 +845,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();
}
@@ -859,7 +860,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 {
OpenPOWER on IntegriCloud