diff options
Diffstat (limited to 'docs/tutorial/LangImpl4.html')
-rw-r--r-- | docs/tutorial/LangImpl4.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/tutorial/LangImpl4.html b/docs/tutorial/LangImpl4.html index b1ee25a..70fd673 100644 --- a/docs/tutorial/LangImpl4.html +++ b/docs/tutorial/LangImpl4.html @@ -485,7 +485,7 @@ LLVM JIT and optimizer. To build this example, use: <div class="doc_code"> <pre> # Compile - g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit interpreter native` -O3 -o toy + g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy # Run ./toy </pre> @@ -502,7 +502,6 @@ at runtime.</p> <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" @@ -1075,7 +1074,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); |