open Llvm_scalar_opts
open Llvm_target
+let context = global_context ()
+let void_type = Llvm.void_type context
(* Tiny unit test framework - really just to help find which line is busted *)
let suite name f =
(*===-- Fixture -----------------------------------------------------------===*)
let filename = Sys.argv.(1)
-let m = create_module (global_context ()) filename
+let m = create_module context filename
let mp = ModuleProvider.create m
let fty = function_type void_type [| |] in
let fn = define_function "fn" fty m in
- ignore (build_ret_void (builder_at_end (global_context ()) (entry_block fn)));
+ ignore (build_ret_void (builder_at_end context (entry_block fn)));
let td = TargetData.create (target_triple m) in