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 | a07136ee2dc29579568e4f08c65db974855841dc (patch) | |
tree | de2cd5ce847fd3fbbb0858c23b058d239355110b /llvm/docs/tutorial/JITTutorial2.html | |
parent | fcd78b02c213d6e436f53fa5ef830e28189db900 (diff) | |
download | bcm5719-llvm-a07136ee2dc29579568e4f08c65db974855841dc.tar.gz bcm5719-llvm-a07136ee2dc29579568e4f08c65db974855841dc.zip |
Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
Diffstat (limited to 'llvm/docs/tutorial/JITTutorial2.html')
-rw-r--r-- | llvm/docs/tutorial/JITTutorial2.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/docs/tutorial/JITTutorial2.html b/llvm/docs/tutorial/JITTutorial2.html index 70de151fcdf..ba3d043ade6 100644 --- a/llvm/docs/tutorial/JITTutorial2.html +++ b/llvm/docs/tutorial/JITTutorial2.html @@ -56,7 +56,7 @@ unsigned gcd(unsigned x, unsigned y) { #include <llvm/PassManager.h> #include <llvm/Analysis/Verifier.h> #include <llvm/Assembly/PrintModulePass.h> -#include <llvm/Support/LLVMBuilder.h> +#include <llvm/Support/IRBuilder.h> using namespace llvm; @@ -110,13 +110,13 @@ Module* makeLLVMModule() { <div class="doc_code"> <pre> - LLVMBuilder builder(entry); + IRBuilder builder(entry); Value* xEqualsY = builder.CreateICmpEQ(x, y, "tmp"); builder.CreateCondBr(xEqualsY, ret, cond_false); </pre> </div> -<p>Our next block, <code>ret</code>, is pretty simple: it just returns the value of <code>x</code>. Recall that this block is only reached if <code>x == y</code>, so this is the correct behavior. Notice that instead of creating a new <code>LLVMBuilder</code> for each block, we can use <code>SetInsertPoint</code> to retarget our existing one. This saves on construction and memory allocation costs.</p> +<p>Our next block, <code>ret</code>, is pretty simple: it just returns the value of <code>x</code>. Recall that this block is only reached if <code>x == y</code>, so this is the correct behavior. Notice that instead of creating a new <code>IRBuilder</code> for each block, we can use <code>SetInsertPoint</code> to retarget our existing one. This saves on construction and memory allocation costs.</p> <div class="doc_code"> <pre> |