Expose JIT::recompileAndRelinkFunction for use through the C API.
authorDuncan Sands <baldrick@free.fr>
Mon, 19 Jul 2010 09:33:13 +0000 (09:33 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 19 Jul 2010 09:33:13 +0000 (09:33 +0000)
Patch by Benjamin Saunders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108690 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm-c/ExecutionEngine.h
lib/ExecutionEngine/ExecutionEngineBindings.cpp

index 5a98a77..f5f4061 100644 (file)
@@ -116,6 +116,8 @@ LLVMBool LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE,
 LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name,
                           LLVMValueRef *OutFn);
 
+void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, LLVMValueRef Fn);
+
 LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE);
 
 void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
index c7495d4..5539542 100644 (file)
@@ -236,6 +236,10 @@ LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name,
   return 1;
 }
 
+void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, LLVMValueRef Fn) {
+    return unwrap(EE)->recompileAndRelinkFunction(unwrap<Function>(Fn));
+}
+
 LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE) {
   return wrap(unwrap(EE)->getTargetData());
 }