summaryrefslogtreecommitdiff
path: root/examples/HowToUseJIT/HowToUseJIT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/HowToUseJIT/HowToUseJIT.cpp')
-rw-r--r--examples/HowToUseJIT/HowToUseJIT.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp
index d50000579e..0482df6248 100644
--- a/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/examples/HowToUseJIT/HowToUseJIT.cpp
@@ -42,7 +42,7 @@
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/GenericValue.h"
-#include <iostream>
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
int main() {
@@ -99,14 +99,15 @@ int main() {
ExistingModuleProvider* MP = new ExistingModuleProvider(M);
ExecutionEngine* EE = ExecutionEngine::create(MP, false);
- std::cout << "We just constructed this LLVM module:\n\n" << *M;
- std::cout << "\n\nRunning foo: " << std::flush;
+ outs() << "We just constructed this LLVM module:\n\n" << *M;
+ outs() << "\n\nRunning foo: ";
+ outs().flush();
// Call the `foo' function with no arguments:
std::vector<GenericValue> noargs;
GenericValue gv = EE->runFunction(FooF, noargs);
// Import result of execution:
- std::cout << "Result: " << gv.IntVal << "\n";
+ outs() << "Result: " << gv.IntVal << "\n";
return 0;
}