summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Chapter6
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter6')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter6/toy.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt
index 6bb2b193752..49627f07ddf 100644
--- a/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch6
toy.cpp
)
+
+export_executable_symbols(Kaleidoscope-Ch6)
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