summaryrefslogtreecommitdiff
path: root/docs/tutorial/LangImpl5.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-06 01:39:12 +0000
committerChris Lattner <sabre@nondot.org>2007-11-06 01:39:12 +0000
commit711552174e3a666175228c72ab88f1c37439e284 (patch)
tree8ed0cc3ce60c04670b2696d58d16b298457844d9 /docs/tutorial/LangImpl5.html
parent89c94f5cedbb975f7820b85acbe56d62f11bdfe5 (diff)
downloadllvm-711552174e3a666175228c72ab88f1c37439e284.tar.gz
llvm-711552174e3a666175228c72ab88f1c37439e284.tar.bz2
llvm-711552174e3a666175228c72ab88f1c37439e284.tar.xz
fixes from Ryan Brown.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/tutorial/LangImpl5.html')
-rw-r--r--docs/tutorial/LangImpl5.html11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html
index acd60456c8..be82b2dab5 100644
--- a/docs/tutorial/LangImpl5.html
+++ b/docs/tutorial/LangImpl5.html
@@ -319,7 +319,7 @@ block. In this case, if control comes in from the "then" block, it gets the
value of "calltmp". If control comes from the "else" block, it gets the value
of "calltmp1".</p>
-<p>At this point, you are probably starting to think "on no! this means my
+<p>At this point, you are probably starting to think "oh no! this means my
simple and elegant front-end will have to start generating SSA form in order to
use LLVM!". Fortunately, this is not the case, and we strongly advise
<em>not</em> implementing an SSA construction algorithm in your front-end
@@ -679,8 +679,8 @@ loop: ; preds = %loop, %entry
%nextvar = add double %i, 1.000000e+00
; termination test
- %multmp = fcmp ult double %i, %n
- %booltmp = uitofp i1 %multmp to double
+ %cmptmp = fcmp ult double %i, %n
+ %booltmp = uitofp i1 %cmptmp to double
%loopcond = fcmp one double %booltmp, 0.000000e+00
br i1 %loopcond, label %loop, label %afterloop
@@ -871,7 +871,8 @@ that is what we return from <tt>ForExprAST::Codegen</tt>.</p>
the tutorial. We added two control flow constructs, and used them to motivate
a couple of aspects of the LLVM IR that are important for front-end implementors
to know. In the next chapter of our saga, we will get a bit crazier and add
-operator overloading to our poor innocent language.</p>
+<a href="LangImpl6.html">user-defined operators</a> to our poor innocent
+language.</p>
</div>
@@ -1378,7 +1379,7 @@ Value *BinaryExprAST::Codegen() {
case '-': return Builder.CreateSub(L, R, "subtmp");
case '*': return Builder.CreateMul(L, R, "multmp");
case '&lt;':
- L = Builder.CreateFCmpULT(L, R, "multmp");
+ L = Builder.CreateFCmpULT(L, R, "cmptmp");
// Convert bool 0/1 to double 0.0 or 1.0
return Builder.CreateUIToFP(L, Type::DoubleTy, "booltmp");
default: return ErrorV("invalid binary operator");