llvm.org GIT mirror llvm / 1f3d276
Update the ocaml docs to work with LLVMContext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79431 91177308-0d34-0410-b5e6-96231b3b80d8 Erick Tryzelaar 10 years ago
5 changed file(s) with 18 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
9494

                  
                
9595 exception Error of string
9696
97 let the_module = create_module "my cool jit"
98 let builder = builder ()
97 let the_module = create_module (global_context ()) "my cool jit"
98 let builder = builder (global_context ())
9999 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
100100
101101
898898
899899 exception Error of string
900900
901 let the_module = create_module "my cool jit"
902 let builder = builder ()
901 let context = global_context ()
902 let the_module = create_module context "my cool jit"
903 let builder = builder context
903904 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
904905
905906 let rec codegen_expr = function
794794
795795 exception Error of string
796796
797 let the_module = create_module "my cool jit"
798 let builder = builder ()
797 let context = global_context ()
798 let the_module = create_module context "my cool jit"
799 let builder = builder context
799800 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
800801
801802 let rec codegen_expr = function
11991199
12001200 exception Error of string
12011201
1202 let the_module = create_module "my cool jit"
1203 let builder = builder ()
1202 let context = global_context ()
1203 let the_module = create_module context "my cool jit"
1204 let builder = builder context
12041205 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
12051206
12061207 let rec codegen_expr = function
11721172
11731173 exception Error of string
11741174
1175 let the_module = create_module "my cool jit"
1176 let builder = builder ()
1175 let context = global_context ()
1176 let the_module = create_module context "my cool jit"
1177 let builder = builder context
11771178 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
11781179
11791180 let rec codegen_expr = function
13831383
13841384 exception Error of string
13851385
1386 let the_module = create_module "my cool jit"
1387 let builder = builder ()
1386 let context = global_context ()
1387 let the_module = create_module context "my cool jit"
1388 let builder = builder context
13881389 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
13891390
13901391 (* Create an alloca instruction in the entry block of the function. This
13911392 * is used for mutable variables etc. *)
13921393 let create_entry_block_alloca the_function var_name =
1393 let builder = builder_at (instr_begin (entry_block the_function)) in
1394 let builder = builder_at context (instr_begin (entry_block the_function)) in
13941395 build_alloca double_type var_name builder
13951396
13961397 let rec codegen_expr = function