Convert the rest of the ocaml types and functions to use context.
[oota-llvm.git] / test / Bindings / Ocaml / bitwriter.ml
index bb769b21738b8ebe726cc767beb3726292cae893..42c8daec5d23ac685f85061b078fa56093089490 100644 (file)
@@ -6,11 +6,13 @@
 (* Note that this takes a moment to link, so it's best to keep the number of
    individual tests low. *)
 
+let context = Llvm.global_context ()
+
 let test x = if not x then exit 1 else ()
 
 let _ =
-  let m = Llvm.create_module (Llvm.global_context ()) "ocaml_test_module" in
+  let m = Llvm.create_module context "ocaml_test_module" in
   
-  ignore (Llvm.define_type_name "caml_int_ty" Llvm.i32_type m);
+  ignore (Llvm.define_type_name "caml_int_ty" (Llvm.i32_type context) m);
   
   test (Llvm_bitwriter.write_bitcode_file m Sys.argv.(1))