Fix exaples using IRBuilder. Thanks, Quadrescence and Glip7 from IRC!
authorGabor Greif <ggreif@gmail.com>
Wed, 11 Mar 2009 19:51:07 +0000 (19:51 +0000)
committerGabor Greif <ggreif@gmail.com>
Wed, 11 Mar 2009 19:51:07 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66687 91177308-0d34-0410-b5e6-96231b3b80d8

docs/tutorial/JITTutorial1.html
docs/tutorial/JITTutorial2.html
docs/tutorial/LangImpl3.html
docs/tutorial/LangImpl4.html
docs/tutorial/LangImpl5.html
docs/tutorial/LangImpl6.html
docs/tutorial/LangImpl7.html

index 3f0e7c1864999acc226d589327b2bab8e7de4c71..4aec470c7a955c75825aac58159166575982290f 100644 (file)
@@ -153,7 +153,7 @@ function will interoperate properly with C code, which is a good thing.</p>
 <div class="doc_code">
 <pre>
   BasicBlock* block = BasicBlock::Create("entry", mul_add);
-  IRBuilder builder(block);
+  IRBuilder&lt;&gt; builder(block);
 </pre>
 </div>
 
index 262457274d08d504205e40ddf0d13c91e0f02bd3..c9adda13438ac18178fdb1a537429ff48840df1e 100644 (file)
@@ -111,7 +111,7 @@ Module* makeLLVMModule() {
 
 <div class="doc_code">
 <pre>
-  IRBuilder builder(entry);
+  IRBuilder&lt;&gt; builder(entry);
   Value* xEqualsY = builder.CreateICmpEQ(x, y, &quot;tmp&quot;);
   builder.CreateCondBr(xEqualsY, ret, cond_false);
 </pre>
index 2acd3ddb5314aedaf4995981abaec8d698196016..faf11d0592bed72d6b422fc2710462270eaf9ac4 100644 (file)
@@ -115,7 +115,7 @@ undeclared parameter):</p>
 Value *ErrorV(const char *Str) { Error(Str); return 0; }
 
 static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder&lt;&gt; Builder;
 static std::map&lt;std::string, Value*&gt; NamedValues;
 </pre>
 </div>
@@ -128,8 +128,8 @@ uses to contain code.</p>
 <p>The <tt>Builder</tt> object is a helper object that makes it easy to generate
 LLVM instructions.  Instances of the <a 
 href="http://llvm.org/doxygen/IRBuilder_8h-source.html"><tt>IRBuilder</tt></a> 
-class keep track of the current place to insert instructions and has methods to
-create new instructions.</p>
+class template keep track of the current place to insert instructions and has
+methods to create new instructions.</p>
 
 <p>The <tt>NamedValues</tt> map keeps track of which values are defined in the
 current scope and what their LLVM representation is.  (In other words, it is a
@@ -1027,7 +1027,7 @@ static PrototypeAST *ParseExtern() {
 //===----------------------------------------------------------------------===//
 
 static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder&lt;&gt; Builder;
 static std::map&lt;std::string, Value*&gt; NamedValues;
 
 Value *ErrorV(const char *Str) { Error(Str); return 0; }
index 95a8b6dd6a158de9ebf6dd8295dd5d79bd1e15d0..7e1fcfa0ff524f5d37edb7d405e446330ccdafca 100644 (file)
@@ -861,7 +861,7 @@ static PrototypeAST *ParseExtern() {
 //===----------------------------------------------------------------------===//
 
 static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder&lt;&gt; Builder;
 static std::map&lt;std::string, Value*&gt; NamedValues;
 static FunctionPassManager *TheFPM;
 
index 0075d60c0bd75806b34d33ecf689a2617cb715b6..bf96b460465fdd58c8805b9a4af6dea91b34aa08 100644 (file)
@@ -1352,7 +1352,7 @@ static PrototypeAST *ParseExtern() {
 //===----------------------------------------------------------------------===//
 
 static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder&lt;&gt; Builder;
 static std::map&lt;std::string, Value*&gt; NamedValues;
 static FunctionPassManager *TheFPM;
 
index 39febee653924252f130c6c32f0c64fb5df80ece..44ad15b009655fcf9bd95ecbf0a9cad5097996c1 100644 (file)
@@ -1357,7 +1357,7 @@ static PrototypeAST *ParseExtern() {
 //===----------------------------------------------------------------------===//
 
 static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder&lt;&gt; Builder;
 static std::map&lt;std::string, Value*&gt; NamedValues;
 static FunctionPassManager *TheFPM;
 
index e146e56163715d9b30aee1aee820d2676d7fb534..f5606484eb9ff947d0392787e1cf0763e1cee6db 100644 (file)
@@ -422,7 +422,7 @@ function:</p>
 /// the function.  This is used for mutable variables etc.
 static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
                                           const std::string &amp;VarName) {
-  IRBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(),
+  IRBuilder&lt;&gt; TmpB(&amp;TheFunction-&gt;getEntryBlock(),
                  TheFunction-&gt;getEntryBlock().begin());
   return TmpB.CreateAlloca(Type::DoubleTy, 0, VarName.c_str());
 }
@@ -1605,7 +1605,7 @@ static PrototypeAST *ParseExtern() {
 //===----------------------------------------------------------------------===//
 
 static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder&lt;&gt; Builder;
 static std::map&lt;std::string, AllocaInst*&gt; NamedValues;
 static FunctionPassManager *TheFPM;
 
@@ -1615,7 +1615,7 @@ Value *ErrorV(const char *Str) { Error(Str); return 0; }
 /// the function.  This is used for mutable variables etc.
 static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
                                           const std::string &amp;VarName) {
-  IRBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(),
+  IRBuilder&lt;&gt; TmpB(&amp;TheFunction-&gt;getEntryBlock(),
                  TheFunction-&gt;getEntryBlock().begin());
   return TmpB.CreateAlloca(Type::DoubleTy, 0, VarName.c_str());
 }