aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/executionengine/executionengine_ocaml.c
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ocaml/executionengine/executionengine_ocaml.c')
-rw-r--r--bindings/ocaml/executionengine/executionengine_ocaml.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/bindings/ocaml/executionengine/executionengine_ocaml.c b/bindings/ocaml/executionengine/executionengine_ocaml.c
index 0557efc..b799250 100644
--- a/bindings/ocaml/executionengine/executionengine_ocaml.c
+++ b/bindings/ocaml/executionengine/executionengine_ocaml.c
@@ -115,8 +115,12 @@ CAMLprim value llvm_ee_add_global_mapping(LLVMValueRef Global, value Ptr,
return Val_unit;
}
-/* Llvm.llvalue -> llexecutionengine -> int64 */
-CAMLprim value llvm_ee_get_pointer_to_global(LLVMValueRef Global,
- LLVMExecutionEngineRef EE) {
- return caml_copy_int64((int64_t) LLVMGetPointerToGlobal(EE, Global));
+CAMLprim value llvm_ee_get_global_value_address(value Name,
+ LLVMExecutionEngineRef EE) {
+ return caml_copy_int64((int64_t) LLVMGetGlobalValueAddress(EE, String_val(Name)));
+}
+
+CAMLprim value llvm_ee_get_function_address(value Name,
+ LLVMExecutionEngineRef EE) {
+ return caml_copy_int64((int64_t) LLVMGetFunctionAddress(EE, String_val(Name)));
}