diff options
| author | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-11 19:15:20 +0000 |
|---|---|---|
| committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-11 19:15:20 +0000 |
| commit | 8a30324e51241c40dc5d6dcc4278d0fec528fd41 (patch) | |
| tree | c724e4bf39e33557e6425aec397cae2708747745 /llvm/docs/tutorial/LangImpl5.html | |
| parent | 66b4a90ae57ae0a188c4c40d80af716088f2926b (diff) | |
| download | bcm5719-llvm-8a30324e51241c40dc5d6dcc4278d0fec528fd41.tar.gz bcm5719-llvm-8a30324e51241c40dc5d6dcc4278d0fec528fd41.zip | |
Make Kaleidoscope not link against the interpreter, since that didn't
work anyway (Interpreter::getPointerToFunction doesn't return a
callable pointer), and improve the error message when an
ExecutionEngine can't be created.
llvm-svn: 95896
Diffstat (limited to 'llvm/docs/tutorial/LangImpl5.html')
| -rw-r--r-- | llvm/docs/tutorial/LangImpl5.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/docs/tutorial/LangImpl5.html b/llvm/docs/tutorial/LangImpl5.html index 9706cf1c2b0..2b0450fef98 100644 --- a/llvm/docs/tutorial/LangImpl5.html +++ b/llvm/docs/tutorial/LangImpl5.html @@ -902,7 +902,6 @@ if/then/else and for expressions.. To build this example, use: <pre> #include "llvm/DerivedTypes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/Interpreter.h" #include "llvm/ExecutionEngine/JIT.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" @@ -1720,7 +1719,12 @@ int main() { TheModule = new Module("my cool jit", Context); // Create the JIT. This takes ownership of the module. - TheExecutionEngine = EngineBuilder(TheModule).create(); + std::string ErrStr; + TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); + if (!TheExecutionEngine) { + fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); + exit(1); + } FunctionPassManager OurFPM(TheModule); |

