Improve pattern match from v1i8 to v1i32 for AArch64 Neon.
[oota-llvm.git] / test / Bindings / Ocaml / executionengine.ml
index ce56c50dcb6189d0cac985f160a8707b9c1f2961..8e2494952a2b6a93bc345db1a87baaef2c1320c7 100644 (file)
@@ -1,5 +1,9 @@
-(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %s -o %t
- * RUN: ./%t %t.bc
+(* RUN: rm -rf %t.builddir
+ * RUN: mkdir -p %t.builddir
+ * RUN: cp %s %t.builddir
+ * RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %t.builddir/executionengine.ml -o %t
+ * RUN: %t
+ * XFAIL: vg_leak
  *)
 
 open Llvm
@@ -64,9 +68,8 @@ let test_executionengine () =
   let m2 = create_module (global_context ()) "test_module2" in
   define_plus m2;
   
-  let ee = ExecutionEngine.create (ModuleProvider.create m) in
-  let mp2 = ModuleProvider.create m2 in
-  ExecutionEngine.add_module_provider mp2 ee;
+  let ee = ExecutionEngine.create m in
+  ExecutionEngine.add_module m2 ee;
   
   (* run_static_ctors *)
   ExecutionEngine.run_static_ctors ee;
@@ -94,17 +97,17 @@ let test_executionengine () =
                                          ee in
   if 4 != GenericValue.as_int res then bomb "plus did not work";
   
-  (* remove_module_provider *)
-  Llvm.dispose_module (ExecutionEngine.remove_module_provider mp2 ee);
+  (* remove_module *)
+  Llvm.dispose_module (ExecutionEngine.remove_module m2 ee);
   
   (* run_static_dtors *)
   ExecutionEngine.run_static_dtors ee;
 
-  (* Show that the target data binding links and runs.*)
-  let td = ExecutionEngine.target_data ee in
+  (* Show that the data layout binding links and runs.*)
+  let dl = ExecutionEngine.data_layout ee in
 
   (* Demonstrate that a garbage pointer wasn't returned. *)
-  let ty = intptr_type td in
+  let ty = DataLayout.intptr_type context dl in
   if ty != i32_type && ty != i64_type then bomb "target_data did not work";
   
   (* dispose *)