Add missing newlines at EOF (for clang++).
[oota-llvm.git] / docs / tutorial / OCamlLangImpl3.html
index b396ef07ae5ccf6fa5b9dcb604a60c4a05a366f8..a59887522ee50fe65cff685800039a45a4fa7ac2 100644 (file)
@@ -26,7 +26,7 @@
     <li><a href="#code">Full Code Listing</a></li>
   </ol>
 </li>
-<li><a href="LangImpl4.html">Chapter 4</a>: Adding JIT and Optimizer
+<li><a href="OCamlLangImpl4.html">Chapter 4</a>: Adding JIT and Optimizer
 Support</li>
 </ul>
 
@@ -95,8 +95,8 @@ an undeclared parameter):</p>
 <pre>
 exception Error of string
 
-let the_module = create_module "my cool jit"
-let builder = builder ()
+let the_module = create_module (global_context ()) "my cool jit"
+let builder = builder (global_context ())
 let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10
 </pre>
 </div>
@@ -148,7 +148,7 @@ internally (<tt>APFloat</tt> has the capability of holding floating point
 constants of <em>A</em>rbitrary <em>P</em>recision).  This code basically just
 creates and returns a <tt>ConstantFP</tt>.  Note that in the LLVM IR
 that constants are all uniqued together and shared.  For this reason, the API
-uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::create(..)".</p>
+uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::Create(..)".</p>
 
 <div class="doc_code">
 <pre>
@@ -159,7 +159,7 @@ uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::create(..)".</p>
 </div>
 
 <p>References to variables are also quite simple using LLVM.  In the simple
-version of Kaleidoscope, we assume that the variable has already been emited
+version of Kaleidoscope, we assume that the variable has already been emitted
 somewhere and its value is available.  In practice, the only values that can be
 in the <tt>Codegen.named_values</tt> map are function arguments.  This code
 simply checks to see that the specified name is in the map (if not, an unknown
@@ -323,7 +323,7 @@ code above.</p>
 first, we want to allow 'extern'ing a function more than once, as long as the
 prototypes for the externs match (since all arguments have the same type, we
 just have to check that the number of arguments match).  Second, we want to
-allow 'extern'ing a function and then definining a body for it.  This is useful
+allow 'extern'ing a function and then defining a body for it.  This is useful
 when defining mutually recursive functions.</p>
 
 <div class="doc_code">
@@ -491,7 +491,7 @@ entry:
 </div>
 
 <p>Note how the parser turns the top-level expression into anonymous functions
-for us.  This will be handy when we add <a href="LangImpl4.html#jit">JIT
+for us.  This will be handy when we add <a href="OCamlLangImpl4.html#jit">JIT
 support</a> in the next chapter.  Also note that the code is very literally
 transcribed, no optimizations are being performed.  We will
 <a href="OCamlLangImpl4.html#trivialconstfold">add optimizations</a> explicitly
@@ -599,7 +599,7 @@ generated.  Here you can see the big picture with all the functions referencing
 each other.</p>
 
 <p>This wraps up the third chapter of the Kaleidoscope tutorial.  Up next, we'll
-describe how to <a href="LangImpl4.html">add JIT codegen and optimizer
+describe how to <a href="OCamlLangImpl4.html">add JIT codegen and optimizer
 support</a> to this so we can actually start running code!</p>
 
 </div>
@@ -899,8 +899,9 @@ 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
 
 let rec codegen_expr = function