diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-09-01 20:09:20 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-09-01 20:09:20 +0000 |
| commit | 44ab470c8e4e820044893258b5b756ad8b9b4f60 (patch) | |
| tree | 204aeb9341628676f69a0a6899488226972abd39 /llvm/docs/tutorial/LangImpl7.html | |
| parent | cbb4be0c930748b70361dc8c290e01a00d09e09b (diff) | |
| download | bcm5719-llvm-44ab470c8e4e820044893258b5b756ad8b9b4f60.tar.gz bcm5719-llvm-44ab470c8e4e820044893258b5b756ad8b9b4f60.zip | |
update the tutorial to use CreateFAdd to create fp operations.
llvm-svn: 112733
Diffstat (limited to 'llvm/docs/tutorial/LangImpl7.html')
| -rw-r--r-- | llvm/docs/tutorial/LangImpl7.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/docs/tutorial/LangImpl7.html b/llvm/docs/tutorial/LangImpl7.html index 9128a8dc588..fa5afeec9d2 100644 --- a/llvm/docs/tutorial/LangImpl7.html +++ b/llvm/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. |

