summaryrefslogtreecommitdiff
path: root/docs/tutorial/LangImpl7.html
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-04-13 06:22:09 +0000
committerDuncan Sands <baldrick@free.fr>2008-04-13 06:22:09 +0000
commit89f6d88db334ba088672ae0753deb7d7b7509bac (patch)
treeacfaa4205f0536df1cd15477aa1c7d1cea52b769 /docs/tutorial/LangImpl7.html
parent86941611c9de791739ecd4664e766b5f5ce6d85e (diff)
downloadllvm-89f6d88db334ba088672ae0753deb7d7b7509bac.tar.gz
llvm-89f6d88db334ba088672ae0753deb7d7b7509bac.tar.bz2
llvm-89f6d88db334ba088672ae0753deb7d7b7509bac.tar.xz
Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder. Patch by Dominic Hamon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/tutorial/LangImpl7.html')
-rw-r--r--docs/tutorial/LangImpl7.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html
index 7138cbdcdf..6d82fa9dbd 100644
--- a/docs/tutorial/LangImpl7.html
+++ b/docs/tutorial/LangImpl7.html
@@ -422,14 +422,14 @@ function:</p>
/// the function. This is used for mutable variables etc.
static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
const std::string &amp;VarName) {
- LLVMBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(),
- TheFunction-&gt;getEntryBlock().begin());
+ IRBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(),
+ TheFunction-&gt;getEntryBlock().begin());
return TmpB.CreateAlloca(Type::DoubleTy, 0, VarName.c_str());
}
</pre>
</div>
-<p>This funny looking code creates an LLVMBuilder object that is pointing at
+<p>This funny looking code creates an IRBuilder object that is pointing at
the first instruction (.begin()) of the entry block. It then creates an alloca
with the expected name and returns it. Because all values in Kaleidoscope are
doubles, there is no need to pass in a type to use.</p>
@@ -1009,7 +1009,7 @@ variables and var/in support. To build this example, use:
#include "llvm/Analysis/Verifier.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Transforms/Scalar.h"
-#include "llvm/Support/LLVMBuilder.h"
+#include "llvm/Support/IRBuilder.h"
#include &lt;cstdio&gt;
#include &lt;string&gt;
#include &lt;map&gt;
@@ -1605,7 +1605,7 @@ static PrototypeAST *ParseExtern() {
//===----------------------------------------------------------------------===//
static Module *TheModule;
-static LLVMFoldingBuilder Builder;
+static IRBuilder Builder;
static std::map&lt;std::string, AllocaInst*&gt; NamedValues;
static FunctionPassManager *TheFPM;
@@ -1615,8 +1615,8 @@ 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) {
- LLVMBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(),
- TheFunction-&gt;getEntryBlock().begin());
+ IRBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(),
+ TheFunction-&gt;getEntryBlock().begin());
return TmpB.CreateAlloca(Type::DoubleTy, 0, VarName.c_str());
}