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 | d6da5dbf7bc0029ddfe3e528b619e904b0f05029 (patch) | |
tree | 206c0815a305ef8d4006d10adbb24e1350920fa4 /examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp | |
parent | 09e759d8e95dd24fdb2cf81edbc29e57dcaf0602 (diff) |
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());
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp b/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp index 50912109e81..945b9706d4d 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp @@ -1110,7 +1110,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)); InitializeModule(); } @@ -1124,7 +1125,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 { |