From 42fc5586241ddc5948ffff67eefe8cb2690534a8 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Thu, 11 Feb 2010 19:15:20 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95896 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/tutorial/LangImpl6.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docs/tutorial/LangImpl6.html') diff --git a/docs/tutorial/LangImpl6.html b/docs/tutorial/LangImpl6.html index 4433450159..5fae906c3b 100644 --- a/docs/tutorial/LangImpl6.html +++ b/docs/tutorial/LangImpl6.html @@ -821,7 +821,6 @@ if/then/else and for expressions.. To build this example, use:
 #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"
@@ -1757,7 +1756,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);
 
-- 
cgit v1.2.3