From a989c7e045dcad58bb58b9fb0cb75ee901f7879e Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 13 Apr 2008 06:22:09 +0000 Subject: 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 --- docs/tutorial/JITTutorial2.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/tutorial/JITTutorial2.html') diff --git a/docs/tutorial/JITTutorial2.html b/docs/tutorial/JITTutorial2.html index 70de151..ba3d043 100644 --- a/docs/tutorial/JITTutorial2.html +++ b/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() {
-  LLVMBuilder builder(entry);
+  IRBuilder builder(entry);
   Value* xEqualsY = builder.CreateICmpEQ(x, y, "tmp");
   builder.CreateCondBr(xEqualsY, ret, cond_false);
 
-

Our next block, ret, is pretty simple: it just returns the value of x. Recall that this block is only reached if x == y, so this is the correct behavior. Notice that instead of creating a new LLVMBuilder for each block, we can use SetInsertPoint to retarget our existing one. This saves on construction and memory allocation costs.

+

Our next block, ret, is pretty simple: it just returns the value of x. Recall that this block is only reached if x == y, so this is the correct behavior. Notice that instead of creating a new IRBuilder for each block, we can use SetInsertPoint to retarget our existing one. This saves on construction and memory allocation costs.

-- 
cgit v1.1