From 25bcaba50eaa77cb4e59ea129664513ce7f8ed38 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 28 Jan 2017 02:47:46 +0000 Subject: 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 --- llvm/examples/Kaleidoscope/Chapter5/toy.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/examples/Kaleidoscope/Chapter5/toy.cpp') 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 { -- cgit v1.2.3