Skip to content

Commit

Permalink
Fix the JIT bindings for ocaml.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70454 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Apr 30, 2009
1 parent cf18996 commit 6100792
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bindings/ocaml/executionengine/executionengine_ocaml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
7 changes: 4 additions & 3 deletions lib/ExecutionEngine/ExecutionEngineBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6100792

Please sign in to comment.