Fix the JIT bindings for ocaml.
authorBill Wendling <isanbard@gmail.com>
Thu, 30 Apr 2009 00:43:39 +0000 (00:43 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 30 Apr 2009 00:43:39 +0000 (00:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70454 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/ocaml/executionengine/executionengine_ocaml.c
lib/ExecutionEngine/ExecutionEngineBindings.cpp

index fc3848a1eb1428dc2bbe70483fcc1be78d74a81e..ec403380ef44e22d50f613709dc9420d235adc66 100644 (file)
@@ -181,7 +181,7 @@ CAMLprim LLVMExecutionEngineRef
 llvm_ee_create_jit(LLVMModuleProviderRef MP) {
   LLVMExecutionEngineRef JIT;
   char *Error;
-  if (LLVMCreateJITCompiler(&JIT, MP, 0, &Error))
+  if (LLVMCreateJITCompiler(&JIT, MP, 3, &Error))
     llvm_raise(llvm_ee_error_exn, Error);
   return JIT;
 }
@@ -191,7 +191,7 @@ CAMLprim LLVMExecutionEngineRef
 llvm_ee_create_fast_jit(LLVMModuleProviderRef MP) {
   LLVMExecutionEngineRef JIT;
   char *Error;
-  if (LLVMCreateJITCompiler(&JIT, MP, 1, &Error))
+  if (LLVMCreateJITCompiler(&JIT, MP, 0, &Error))
     llvm_raise(llvm_ee_error_exn, Error);
   return JIT;
 }
index 0ef85dd0369a28f2b4fd222141b062273c8567d9..83397a586d5372b475959a9771e682eab68f4951 100644 (file)
@@ -114,11 +114,12 @@ int LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp,
 
 int LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT,
                           LLVMModuleProviderRef MP,
-                          CodeGenOpt::Level OptLevel,
+                          unsigned OptLevel,
                           char **OutError) {
   std::string Error;
-  if (ExecutionEngine *JIT = ExecutionEngine::createJIT(unwrap(MP), &Error, 0,
-                                                        OptLevel)) {
+  if (ExecutionEngine *JIT =
+      ExecutionEngine::createJIT(unwrap(MP), &Error, 0,
+                                 (CodeGenOpt::Level)OptLevel)) {
     *OutJIT = wrap(JIT);
     return 0;
   }