[llvm-commits] [llvm] r62697 - in /llvm/trunk: include/llvm-c/ExecutionEngine.h lib/ExecutionEngine/ExecutionEngineBindings.cpp

Chris Lattner sabre at nondot.org
Wed Jan 21 10:11:10 PST 2009


Author: lattner
Date: Wed Jan 21 12:11:10 2009
New Revision: 62697

URL: http://llvm.org/viewvc/llvm-project?rev=62697&view=rev
Log:
add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!
PR3364

Modified:
    llvm/trunk/include/llvm-c/ExecutionEngine.h
    llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp

Modified: llvm/trunk/include/llvm-c/ExecutionEngine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/ExecutionEngine.h?rev=62697&r1=62696&r2=62697&view=diff

==============================================================================
--- llvm/trunk/include/llvm-c/ExecutionEngine.h (original)
+++ llvm/trunk/include/llvm-c/ExecutionEngine.h Wed Jan 21 12:11:10 2009
@@ -95,6 +95,8 @@
 void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
                           void* Addr);
 
+void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
+
 #ifdef __cplusplus
 }
 

Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp?rev=62697&r1=62696&r2=62697&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Wed Jan 21 12:11:10 2009
@@ -199,3 +199,7 @@
                           void* Addr) {
   unwrap(EE)->addGlobalMapping(unwrap<GlobalValue>(Global), Addr);
 }
+
+void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global) {
+  return unwrap(EE)->getPointerToGlobal(unwrap<GlobalValue>(Global));
+}





More information about the llvm-commits mailing list