OSDN Git Service

add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!
authorChris Lattner <sabre@nondot.org>
Wed, 21 Jan 2009 18:11:10 +0000 (18:11 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 Jan 2009 18:11:10 +0000 (18:11 +0000)
PR3364

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

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

index d138d07..8390c68 100644 (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
 }
 
index 7c55db0..39bf601 100644 (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));
+}