[C API] Expose LLVMGetGlobalValueAddress and LLVMGetFunctionAddress.
[oota-llvm.git] / lib / ExecutionEngine / ExecutionEngineBindings.cpp
index 7fc72ae19c525259f3a676a90eb4a98333454729..aaa53f0c69539adbdef88af25dec65a012cd5659 100644 (file)
@@ -328,6 +328,14 @@ void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global) {
   return unwrap(EE)->getPointerToGlobal(unwrap<GlobalValue>(Global));
 }
 
+uint64_t LLVMGetGlobalValueAddress(LLVMExecutionEngineRef EE, const char *Name) {
+  return unwrap(EE)->getGlobalValueAddress(Name);
+}
+
+uint64_t LLVMGetFunctionAddress(LLVMExecutionEngineRef EE, const char *Name) {
+  return unwrap(EE)->getFunctionAddress(Name);
+}
+
 /*===-- Operations on memory managers -------------------------------------===*/
 
 namespace {