llvm-c: Add LLVMGetPointerToFunction
[oota-llvm.git] / lib / ExecutionEngine / ExecutionEngineBindings.cpp
index 88e73bf253e496d2d46d316b714237212751569a..f7abf95f5e2e1c7c0c87548b15f7045523f0e230 100644 (file)
@@ -276,6 +276,10 @@ LLVMGenericValueRef LLVMRunFunction(LLVMExecutionEngineRef EE, LLVMValueRef F,
   return wrap(Result);
 }
 
+void *LLVMGetPointerToFunction(LLVMExecutionEngineRef EE, LLVMValueRef F) {
+  return unwrap(EE)->getPointerToFunction(unwrap<Function>(F));
+}
+
 void LLVMFreeMachineCodeForFunction(LLVMExecutionEngineRef EE, LLVMValueRef F) {
   unwrap(EE)->freeMachineCodeForFunction(unwrap<Function>(F));
 }