diff options
author | Matthias Braun <matze@braunis.de> | 2017-01-28 02:47:46 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-01-28 02:47:46 +0000 |
commit | 25bcaba50eaa77cb4e59ea129664513ce7f8ed38 (patch) | |
tree | 1124531229248f488000c4d646de1e69f341f0e5 /llvm/examples/Kaleidoscope/Chapter8/toy.cpp | |
parent | 95be17230856cd79de19d2f5637b081694154fcf (diff) | |
download | bcm5719-llvm-25bcaba50eaa77cb4e59ea129664513ce7f8ed38.tar.gz bcm5719-llvm-25bcaba50eaa77cb4e59ea129664513ce7f8ed38.zip |
Use print() instead of dump() in code
The dump() functions are meant to be used in a debugger, code should
typically use something like print(errs());
llvm-svn: 293365
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter8/toy.cpp')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index f7bb814da77..354380adfc4 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -1114,7 +1114,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"); } } else { // Skip token for error recovery. @@ -1126,7 +1127,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 { |