summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-08-27 18:13:34 +0000
committerLang Hames <lhames@gmail.com>2015-08-27 18:13:34 +0000
commitf624d1ab8dbcf2a10e4d02eba004bb1e877c159e (patch)
tree5c69726f8e92f323dc252ba1dae96df65a751c69 /llvm/examples/Kaleidoscope/Chapter6/toy.cpp
parentf8144ab44fba3ef25701ccc3ef9a0f8cae1b9c3b (diff)
downloadbcm5719-llvm-f624d1ab8dbcf2a10e4d02eba004bb1e877c159e.tar.gz
bcm5719-llvm-f624d1ab8dbcf2a10e4d02eba004bb1e877c159e.zip
Add Kaleidoscope regression tests.
These will be run if LLVM_BUILD_EXAMPLES is enabled. llvm-svn: 246175
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter6/toy.cpp')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter6/toy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
index e1bed45189e..8f802384d1d 100644
--- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud