diff options
author | Duncan Sands <baldrick@free.fr> | 2008-04-13 06:22:09 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-04-13 06:22:09 +0000 |
commit | a989c7e045dcad58bb58b9fb0cb75ee901f7879e (patch) | |
tree | acfaa4205f0536df1cd15477aa1c7d1cea52b769 /docs/tutorial/LangImpl3.html | |
parent | 20e7f1a3ff99202bdba233623b2cf3f4f902d7b1 (diff) | |
download | external_llvm-a989c7e045dcad58bb58b9fb0cb75ee901f7879e.zip external_llvm-a989c7e045dcad58bb58b9fb0cb75ee901f7879e.tar.gz external_llvm-a989c7e045dcad58bb58b9fb0cb75ee901f7879e.tar.bz2 |
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/LangImpl3.html')
-rw-r--r-- | docs/tutorial/LangImpl3.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/tutorial/LangImpl3.html b/docs/tutorial/LangImpl3.html index 60ad5f1..28b9dac 100644 --- a/docs/tutorial/LangImpl3.html +++ b/docs/tutorial/LangImpl3.html @@ -111,7 +111,7 @@ undeclared parameter):</p> Value *ErrorV(const char *Str) { Error(Str); return 0; } static Module *TheModule; -static LLVMBuilder Builder; +static IRBuilder Builder; static std::map<std::string, Value*> NamedValues; </pre> </div> @@ -123,7 +123,7 @@ 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/LLVMBuilder_8h-source.html"><tt>LLVMBuilder</tt></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> @@ -216,7 +216,7 @@ code, we do a simple switch on the opcode to create the right LLVM instruction. </p> <p>In the example above, the LLVM builder class is starting to show its value. -LLVMBuilder knows where to insert the newly created instruction, all you have to +IRBuilder knows where to insert the newly created instruction, all you have to do is specify what instruction to create (e.g. with <tt>CreateAdd</tt>), which operands to use (<tt>L</tt> and <tt>R</tt> here) and optionally provide a name for the generated instruction.</p> @@ -680,7 +680,7 @@ our makefile/command line about which options to use:</p> #include "llvm/DerivedTypes.h" #include "llvm/Module.h" #include "llvm/Analysis/Verifier.h" -#include "llvm/Support/LLVMBuilder.h" +#include "llvm/Support/IRBuilder.h" #include <cstdio> #include <string> #include <map> @@ -1023,7 +1023,7 @@ static PrototypeAST *ParseExtern() { //===----------------------------------------------------------------------===// static Module *TheModule; -static LLVMBuilder Builder; +static IRBuilder Builder; static std::map<std::string, Value*> NamedValues; Value *ErrorV(const char *Str) { Error(Str); return 0; } |