X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FKaleidoscope%2FChapter6%2Ftoy.cpp;h=8f802384d1df8841a3e04c0b3747a42d83117e44;hb=b325a1ace53c1f0b1b38505fefeb08114f40dc10;hp=e1bed45189e0593d36c113036b200757080b7f9f;hpb=2b96ce62f49d4701bc9880e27ebc894a371342e2;p=oota-llvm.git diff --git a/examples/Kaleidoscope/Chapter6/toy.cpp b/examples/Kaleidoscope/Chapter6/toy.cpp index e1bed45189e..8f802384d1d 100644 --- a/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/examples/Kaleidoscope/Chapter6/toy.cpp @@ -1024,13 +1024,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - putchar((char)X); + fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - printf("%f\n", X); + fprintf(stderr, "%f\n", X); return 0; }