Update the ocaml docs to work with LLVMContext.
[oota-llvm.git] / docs / tutorial / OCamlLangImpl7.html
index abda44011cab14a629855bd4f463d8b3a515c1ba..dab3059c89a478a84b72f0181ee5bfd497749c1f 100644 (file)
@@ -1384,14 +1384,15 @@ open Llvm
 
 exception Error of string
 
-let the_module = create_module "my cool jit"
-let builder = builder ()
+let context = global_context ()
+let the_module = create_module context "my cool jit"
+let builder = builder context
 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
 
 (* Create an alloca instruction in the entry block of the function. This
  * is used for mutable variables etc. *)
 let create_entry_block_alloca the_function var_name =
-  let builder = builder_at (instr_begin (entry_block the_function)) in
+  let builder = builder_at context (instr_begin (entry_block the_function)) in
   build_alloca double_type var_name builder
 
 let rec codegen_expr = function