update the tutorial to use CreateFAdd to create fp operations.
[oota-llvm.git] / docs / tutorial / LangImpl6.html
index 9a05fbf7b833250b64662e0c738adc866f060480..97505f7c3497a55feac28a5428fe637ba6793b60 100644 (file)
@@ -1540,7 +1540,7 @@ Value *ForExprAST::Codegen() {
     StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0));
   }
   
-  Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
+  Value *NextVar = Builder.CreateFAdd(Variable, StepVal, "nextvar");
 
   // Compute the end condition.
   Value *EndCond = End->Codegen();