From 7c1483bc6f009318ce66c4d37d1ba930e01a6d13 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Thu, 27 Mar 2008 00:27:14 +0000 Subject: Expose ExecutionEngine::getTargetData() to c and ocaml bindings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48851 91177308-0d34-0410-b5e6-96231b3b80d8 --- bindings/ocaml/executionengine/Makefile | 2 +- bindings/ocaml/executionengine/llvm_executionengine.ml | 3 +++ bindings/ocaml/executionengine/llvm_executionengine.mli | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'bindings') diff --git a/bindings/ocaml/executionengine/Makefile b/bindings/ocaml/executionengine/Makefile index 445e0ea..40fb98e 100644 --- a/bindings/ocaml/executionengine/Makefile +++ b/bindings/ocaml/executionengine/Makefile @@ -15,6 +15,6 @@ LEVEL := ../../.. LIBRARYNAME := llvm_executionengine DONT_BUILD_RELINKED := 1 UsedComponents := executionengine jit interpreter native -UsedOcamlInterfaces := llvm +UsedOcamlInterfaces := llvm llvm_target include ../Makefile.ocaml diff --git a/bindings/ocaml/executionengine/llvm_executionengine.ml b/bindings/ocaml/executionengine/llvm_executionengine.ml index a73fc1e..4b9132d 100644 --- a/bindings/ocaml/executionengine/llvm_executionengine.ml +++ b/bindings/ocaml/executionengine/llvm_executionengine.ml @@ -82,6 +82,9 @@ module ExecutionEngine = struct = "llvm_ee_run_function_as_main" external free_machine_code: Llvm.llvalue -> t -> unit = "llvm_ee_free_machine_code" + + external target_data: t -> Llvm_target.TargetData.t + = "LLVMGetExecutionEngineTargetData" (* The following are not bound. Patches are welcome. diff --git a/bindings/ocaml/executionengine/llvm_executionengine.mli b/bindings/ocaml/executionengine/llvm_executionengine.mli index d3037fe..9794f35 100644 --- a/bindings/ocaml/executionengine/llvm_executionengine.mli +++ b/bindings/ocaml/executionengine/llvm_executionengine.mli @@ -147,4 +147,8 @@ module ExecutionEngine: sig (** [free_machine_code f ee] releases the memory in the execution engine [ee] used to store the machine code for the function [f]. *) val free_machine_code: Llvm.llvalue -> t -> unit + + (** [target_data ee] is the target data owned by the execution engine + [ee]. *) + val target_data: t -> Llvm_target.TargetData.t end -- cgit v1.1