diff options
Diffstat (limited to 'docs/tutorial/LangImpl7.html')
-rw-r--r-- | docs/tutorial/LangImpl7.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html index be2d69e..1ec99b1 100644 --- a/docs/tutorial/LangImpl7.html +++ b/docs/tutorial/LangImpl7.html @@ -480,7 +480,7 @@ the unabridged code):</p> <b>// Reload, increment, and restore the alloca. This handles the case where // the body of the loop mutates the variable. Value *CurVar = Builder.CreateLoad(Alloca); - Value *NextVar = Builder.CreateAdd(CurVar, StepVal, "nextvar"); + Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar"); Builder.CreateStore(NextVar, Alloca);</b> ... </pre> @@ -1833,7 +1833,7 @@ Value *ForExprAST::Codegen() { // Reload, increment, and restore the alloca. This handles the case where // the body of the loop mutates the variable. Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str()); - Value *NextVar = Builder.CreateAdd(CurVar, StepVal, "nextvar"); + Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar"); Builder.CreateStore(NextVar, Alloca); // Convert condition to a bool by comparing equal to 0.0. @@ -2158,7 +2158,7 @@ int main() { <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-06-14 08:09:39 +0200 (Mon, 14 Jun 2010) $ + Last modified: $Date: 2010-09-01 22:09:20 +0200 (Wed, 01 Sep 2010) $ </address> </body> </html> |