X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FKaleidoscope%2FChapter7%2Ftoy.cpp;h=be00f873e6d571f997d9ce7fe5a14d4229967acc;hb=b325a1ace53c1f0b1b38505fefeb08114f40dc10;hp=4558522952ce26d405745f2c8c1f3e426d349ccd;hpb=2b96ce62f49d4701bc9880e27ebc894a371342e2;p=oota-llvm.git diff --git a/examples/Kaleidoscope/Chapter7/toy.cpp b/examples/Kaleidoscope/Chapter7/toy.cpp index 4558522952c..be00f873e6d 100644 --- a/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/examples/Kaleidoscope/Chapter7/toy.cpp @@ -1190,13 +1190,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; }