add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!

PR3364

llvm-svn: 62697
This commit is contained in:
Chris Lattner 2009-01-21 18:11:10 +00:00
parent 77527f5812
commit 41b43da217
2 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,8 @@ LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE);
void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
void* Addr);
void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
#ifdef __cplusplus
}

View File

@ -199,3 +199,7 @@ void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
void* Addr) {
unwrap(EE)->addGlobalMapping(unwrap<GlobalValue>(Global), Addr);
}
void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global) {
return unwrap(EE)->getPointerToGlobal(unwrap<GlobalValue>(Global));
}