XFAIL vg_leak the new test as the rest.
[oota-llvm.git] / test / Bindings / Ocaml / analysis.ml
index 8d8a1df5b7d1389048df942477a7e4b8598b5b4d..7df8e21203a9373b38772544c1b2ed3fadee1240 100644 (file)
@@ -1,5 +1,6 @@
-(* RUN: %ocamlc llvm.cma llvm_analysis.cma %s -o %t
- * RUN: ./%t %t.bc
+(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa %s -o %t
+ * RUN: %t
+ * XFAIL: vg_leak
  *)
 
 open Llvm
@@ -8,6 +9,8 @@ open Llvm_analysis
 (* Note that this takes a moment to link, so it's best to keep the number of
    individual tests low. *)
 
+let context = global_context ()
+
 let test x = if not x then exit 1 else ()
 
 let bomb msg =
@@ -15,10 +18,10 @@ let bomb msg =
   exit 2
 
 let _ =
-  let fty = function_type void_type [| |] in
-  let m = create_module "valid_m" in
+  let fty = function_type (void_type context) [| |] in
+  let m = create_module context "valid_m" in
   let fn = define_function "valid_fn" fty m in
-  let at_entry = builder_at_end (entry_block fn) in
+  let at_entry = builder_at_end context (entry_block fn) in
   ignore (build_ret_void at_entry);