aboutsummaryrefslogtreecommitdiff
path: root/test/Bindings
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2008-03-27 00:27:14 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2008-03-27 00:27:14 +0000
commit7c1483bc6f009318ce66c4d37d1ba930e01a6d13 (patch)
tree8aa88262df0f503ca36854ba1150deb772dcf048 /test/Bindings
parent5b0c85588a5cdb90e975257f53291bb08e461b81 (diff)
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
Diffstat (limited to 'test/Bindings')
-rw-r--r--test/Bindings/Ocaml/executionengine.ml10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Bindings/Ocaml/executionengine.ml b/test/Bindings/Ocaml/executionengine.ml
index a091098b5b..d238076a06 100644
--- a/test/Bindings/Ocaml/executionengine.ml
+++ b/test/Bindings/Ocaml/executionengine.ml
@@ -1,9 +1,10 @@
-(* RUN: %ocamlc -warn-error A llvm.cma llvm_executionengine.cma %s -o %t
+(* RUN: %ocamlc -warn-error A llvm.cma llvm_target.cma llvm_executionengine.cma %s -o %t
* RUN: ./%t %t.bc
*)
open Llvm
open Llvm_executionengine
+open Llvm_target
(* Note that this takes a moment to link, so it's best to keep the number of
individual tests low. *)
@@ -92,6 +93,13 @@ let test_executionengine () =
(* run_static_dtors *)
ExecutionEngine.run_static_dtors ee;
+
+ (* Show that the target data binding links and runs.*)
+ let td = ExecutionEngine.target_data ee in
+
+ (* Demonstrate that a garbage pointer wasn't returned. *)
+ let ty = intptr_type td in
+ if ty != i32_type && ty != i64_type then bomb "target_data did not work";
(* dispose *)
ExecutionEngine.dispose ee