summaryrefslogtreecommitdiff
path: root/bindings/ocaml/executionengine
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ocaml/executionengine')
-rw-r--r--bindings/ocaml/executionengine/executionengine_ocaml.c7
-rw-r--r--bindings/ocaml/executionengine/llvm_executionengine.ml3
2 files changed, 8 insertions, 2 deletions
diff --git a/bindings/ocaml/executionengine/executionengine_ocaml.c b/bindings/ocaml/executionengine/executionengine_ocaml.c
index 32f6c5907c..3d2c8b09e7 100644
--- a/bindings/ocaml/executionengine/executionengine_ocaml.c
+++ b/bindings/ocaml/executionengine/executionengine_ocaml.c
@@ -324,3 +324,10 @@ CAMLprim value llvm_ee_free_machine_code(LLVMValueRef F,
return Val_unit;
}
+extern value llvm_alloc_target_data(LLVMTargetDataRef TargetData);
+
+/* ExecutionEngine.t -> Llvm_target.TargetData.t */
+CAMLprim value llvm_ee_get_target_data(LLVMExecutionEngineRef EE) {
+ LLVMTargetDataRef TD = LLVMGetExecutionEngineTargetData(EE);
+ return llvm_alloc_target_data(TD);
+}
diff --git a/bindings/ocaml/executionengine/llvm_executionengine.ml b/bindings/ocaml/executionengine/llvm_executionengine.ml
index b083b7d14e..01991540c0 100644
--- a/bindings/ocaml/executionengine/llvm_executionengine.ml
+++ b/bindings/ocaml/executionengine/llvm_executionengine.ml
@@ -84,11 +84,10 @@ module ExecutionEngine = struct
= "llvm_ee_free_machine_code"
external target_data: t -> Llvm_target.DataLayout.t
- = "LLVMGetExecutionEngineTargetData"
+ = "llvm_ee_get_target_data"
(* The following are not bound. Patches are welcome.
- get_target_data: t -> lltargetdata
add_global_mapping: llvalue -> llgenericvalue -> t -> unit
clear_all_global_mappings: t -> unit
update_global_mapping: llvalue -> llgenericvalue -> t -> unit