mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-03 13:51:39 +00:00
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
This commit is contained in:
parent
b02b878827
commit
1f3d276a3d
@ -95,8 +95,8 @@ an undeclared parameter):</p>
|
|||||||
<pre>
|
<pre>
|
||||||
exception Error of string
|
exception Error of string
|
||||||
|
|
||||||
let the_module = create_module "my cool jit"
|
let the_module = create_module (global_context ()) "my cool jit"
|
||||||
let builder = builder ()
|
let builder = builder (global_context ())
|
||||||
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
@ -899,8 +899,9 @@ open Llvm
|
|||||||
|
|
||||||
exception Error of string
|
exception Error of string
|
||||||
|
|
||||||
let the_module = create_module "my cool jit"
|
let context = global_context ()
|
||||||
let builder = builder ()
|
let the_module = create_module context "my cool jit"
|
||||||
|
let builder = builder context
|
||||||
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
||||||
|
|
||||||
let rec codegen_expr = function
|
let rec codegen_expr = function
|
||||||
|
@ -795,8 +795,9 @@ open Llvm
|
|||||||
|
|
||||||
exception Error of string
|
exception Error of string
|
||||||
|
|
||||||
let the_module = create_module "my cool jit"
|
let context = global_context ()
|
||||||
let builder = builder ()
|
let the_module = create_module context "my cool jit"
|
||||||
|
let builder = builder context
|
||||||
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
||||||
|
|
||||||
let rec codegen_expr = function
|
let rec codegen_expr = function
|
||||||
|
@ -1200,8 +1200,9 @@ open Llvm
|
|||||||
|
|
||||||
exception Error of string
|
exception Error of string
|
||||||
|
|
||||||
let the_module = create_module "my cool jit"
|
let context = global_context ()
|
||||||
let builder = builder ()
|
let the_module = create_module context "my cool jit"
|
||||||
|
let builder = builder context
|
||||||
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
||||||
|
|
||||||
let rec codegen_expr = function
|
let rec codegen_expr = function
|
||||||
|
@ -1173,8 +1173,9 @@ open Llvm
|
|||||||
|
|
||||||
exception Error of string
|
exception Error of string
|
||||||
|
|
||||||
let the_module = create_module "my cool jit"
|
let context = global_context ()
|
||||||
let builder = builder ()
|
let the_module = create_module context "my cool jit"
|
||||||
|
let builder = builder context
|
||||||
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
||||||
|
|
||||||
let rec codegen_expr = function
|
let rec codegen_expr = function
|
||||||
|
@ -1384,14 +1384,15 @@ open Llvm
|
|||||||
|
|
||||||
exception Error of string
|
exception Error of string
|
||||||
|
|
||||||
let the_module = create_module "my cool jit"
|
let context = global_context ()
|
||||||
let builder = builder ()
|
let the_module = create_module context "my cool jit"
|
||||||
|
let builder = builder context
|
||||||
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
|
||||||
|
|
||||||
(* Create an alloca instruction in the entry block of the function. This
|
(* Create an alloca instruction in the entry block of the function. This
|
||||||
* is used for mutable variables etc. *)
|
* is used for mutable variables etc. *)
|
||||||
let create_entry_block_alloca the_function var_name =
|
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
|
build_alloca double_type var_name builder
|
||||||
|
|
||||||
let rec codegen_expr = function
|
let rec codegen_expr = function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user