[llvm-commits] [llvm] r66687 - in /llvm/trunk/docs/tutorial: JITTutorial1.html JITTutorial2.html LangImpl3.html LangImpl4.html LangImpl5.html LangImpl6.html LangImpl7.html
Gabor Greif
ggreif at gmail.com
Wed Mar 11 12:51:08 PDT 2009
Author: ggreif
Date: Wed Mar 11 14:51:07 2009
New Revision: 66687
URL: http://llvm.org/viewvc/llvm-project?rev=66687&view=rev
Log:
Fix exaples using IRBuilder. Thanks, Quadrescence and Glip7 from IRC!
Modified:
llvm/trunk/docs/tutorial/JITTutorial1.html
llvm/trunk/docs/tutorial/JITTutorial2.html
llvm/trunk/docs/tutorial/LangImpl3.html
llvm/trunk/docs/tutorial/LangImpl4.html
llvm/trunk/docs/tutorial/LangImpl5.html
llvm/trunk/docs/tutorial/LangImpl6.html
llvm/trunk/docs/tutorial/LangImpl7.html
Modified: llvm/trunk/docs/tutorial/JITTutorial1.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/JITTutorial1.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/JITTutorial1.html (original)
+++ llvm/trunk/docs/tutorial/JITTutorial1.html Wed Mar 11 14:51:07 2009
@@ -153,7 +153,7 @@
<div class="doc_code">
<pre>
BasicBlock* block = BasicBlock::Create("entry", mul_add);
- IRBuilder builder(block);
+ IRBuilder<> builder(block);
</pre>
</div>
Modified: llvm/trunk/docs/tutorial/JITTutorial2.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/JITTutorial2.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/JITTutorial2.html (original)
+++ llvm/trunk/docs/tutorial/JITTutorial2.html Wed Mar 11 14:51:07 2009
@@ -111,7 +111,7 @@
<div class="doc_code">
<pre>
- IRBuilder builder(entry);
+ IRBuilder<> builder(entry);
Value* xEqualsY = builder.CreateICmpEQ(x, y, "tmp");
builder.CreateCondBr(xEqualsY, ret, cond_false);
</pre>
Modified: llvm/trunk/docs/tutorial/LangImpl3.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl3.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl3.html Wed Mar 11 14:51:07 2009
@@ -115,7 +115,7 @@
Value *ErrorV(const char *Str) { Error(Str); return 0; }
static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder<> Builder;
static std::map<std::string, Value*> NamedValues;
</pre>
</div>
@@ -128,8 +128,8 @@
<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 Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder<> Builder;
static std::map<std::string, Value*> NamedValues;
Value *ErrorV(const char *Str) { Error(Str); return 0; }
Modified: llvm/trunk/docs/tutorial/LangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl4.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl4.html Wed Mar 11 14:51:07 2009
@@ -861,7 +861,7 @@
//===----------------------------------------------------------------------===//
static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder<> Builder;
static std::map<std::string, Value*> NamedValues;
static FunctionPassManager *TheFPM;
Modified: llvm/trunk/docs/tutorial/LangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl5.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl5.html Wed Mar 11 14:51:07 2009
@@ -1352,7 +1352,7 @@
//===----------------------------------------------------------------------===//
static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder<> Builder;
static std::map<std::string, Value*> NamedValues;
static FunctionPassManager *TheFPM;
Modified: llvm/trunk/docs/tutorial/LangImpl6.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl6.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl6.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl6.html Wed Mar 11 14:51:07 2009
@@ -1357,7 +1357,7 @@
//===----------------------------------------------------------------------===//
static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder<> Builder;
static std::map<std::string, Value*> NamedValues;
static FunctionPassManager *TheFPM;
Modified: llvm/trunk/docs/tutorial/LangImpl7.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=66687&r1=66686&r2=66687&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl7.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl7.html Wed Mar 11 14:51:07 2009
@@ -422,7 +422,7 @@
/// the function. This is used for mutable variables etc.
static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
const std::string &VarName) {
- IRBuilder TmpB(&TheFunction->getEntryBlock(),
+ IRBuilder<> TmpB(&TheFunction->getEntryBlock(),
TheFunction->getEntryBlock().begin());
return TmpB.CreateAlloca(Type::DoubleTy, 0, VarName.c_str());
}
@@ -1605,7 +1605,7 @@
//===----------------------------------------------------------------------===//
static Module *TheModule;
-static IRBuilder Builder;
+static IRBuilder<> Builder;
static std::map<std::string, AllocaInst*> NamedValues;
static FunctionPassManager *TheFPM;
@@ -1615,7 +1615,7 @@
/// the function. This is used for mutable variables etc.
static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
const std::string &VarName) {
- IRBuilder TmpB(&TheFunction->getEntryBlock(),
+ IRBuilder<> TmpB(&TheFunction->getEntryBlock(),
TheFunction->getEntryBlock().begin());
return TmpB.CreateAlloca(Type::DoubleTy, 0, VarName.c_str());
}
More information about the llvm-commits
mailing list