llvm-c: Add LLVMGetPointerToFunction

Differential Revision: http://llvm-reviews.chandlerc.com/D1715

llvm-svn: 191030
This commit is contained in:
Anders Waldenborg 2013-09-19 19:55:06 +00:00
parent 5b15455823
commit 8bbda41c6e
2 changed files with 6 additions and 0 deletions

View File

@ -141,6 +141,8 @@ LLVMGenericValueRef LLVMRunFunction(LLVMExecutionEngineRef EE, LLVMValueRef F,
unsigned NumArgs,
LLVMGenericValueRef *Args);
void *LLVMGetPointerToFunction(LLVMExecutionEngineRef EE, LLVMValueRef F);
void LLVMFreeMachineCodeForFunction(LLVMExecutionEngineRef EE, LLVMValueRef F);
void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M);

View 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));
}