[llvm-commits] [llvm] r52165 - in /llvm/trunk/docs/tutorial: LangImpl3.html LangImpl4.html LangImpl5.html LangImpl6.html LangImpl7.html

Gabor Greif ggreif at gmail.com
Mon Jun 9 18:52:17 PDT 2008


Author: ggreif
Date: Mon Jun  9 20:52:17 2008
New Revision: 52165

URL: http://llvm.org/viewvc/llvm-project?rev=52165&view=rev
Log:
adjust calls to ConstantFP::get to new API

Modified:
    llvm/trunk/docs/tutorial/LangImpl3.html
    llvm/trunk/docs/tutorial/LangImpl4.html
    llvm/trunk/docs/tutorial/LangImpl5.html
    llvm/trunk/docs/tutorial/LangImpl6.html
    llvm/trunk/docs/tutorial/LangImpl7.html

Modified: llvm/trunk/docs/tutorial/LangImpl3.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=52165&r1=52164&r2=52165&view=diff

==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl3.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl3.html Mon Jun  9 20:52:17 2008
@@ -159,7 +159,7 @@
 <div class="doc_code">
 <pre>
 Value *NumberExprAST::Codegen() {
-  return ConstantFP::get(Type::DoubleTy, APFloat(Val));
+  return ConstantFP::get(APFloat(Val));
 }
 </pre>
 </div>
@@ -1033,7 +1033,7 @@
 Value *ErrorV(const char *Str) { Error(Str); return 0; }
 
 Value *NumberExprAST::Codegen() {
-  return ConstantFP::get(Type::DoubleTy, APFloat(Val));
+  return ConstantFP::get(APFloat(Val));
 }
 
 Value *VariableExprAST::Codegen() {

Modified: llvm/trunk/docs/tutorial/LangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=52165&r1=52164&r2=52165&view=diff

==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl4.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl4.html Mon Jun  9 20:52:17 2008
@@ -863,7 +863,7 @@
 Value *ErrorV(const char *Str) { Error(Str); return 0; }
 
 Value *NumberExprAST::Codegen() {
-  return ConstantFP::get(Type::DoubleTy, APFloat(Val));
+  return ConstantFP::get(APFloat(Val));
 }
 
 Value *VariableExprAST::Codegen() {

Modified: llvm/trunk/docs/tutorial/LangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=52165&r1=52164&r2=52165&view=diff

==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl5.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl5.html Mon Jun  9 20:52:17 2008
@@ -364,7 +364,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   CondV = Builder.CreateFCmpONE(CondV, 
-                                ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                ConstantFP::get(APFloat(0.0)),
                                 "ifcond");
 </pre>
 </div>
@@ -796,7 +796,7 @@
     if (StepVal == 0) return 0;
   } else {
     // If not specified, use 1.0.
-    StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
+    StepVal = ConstantFP::get(APFloat(1.0));
   }
   
   Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
@@ -815,7 +815,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   EndCond = Builder.CreateFCmpONE(EndCond, 
-                                  ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                  ConstantFP::get(APFloat(0.0)),
                                   "loopcond");
 </pre>
 </div>
@@ -1359,7 +1359,7 @@
 Value *ErrorV(const char *Str) { Error(Str); return 0; }
 
 Value *NumberExprAST::Codegen() {
-  return ConstantFP::get(Type::DoubleTy, APFloat(Val));
+  return ConstantFP::get(APFloat(Val));
 }
 
 Value *VariableExprAST::Codegen() {
@@ -1410,7 +1410,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   CondV = Builder.CreateFCmpONE(CondV, 
-                                ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                ConstantFP::get(APFloat(0.0)),
                                 "ifcond");
   
   Function *TheFunction = Builder.GetInsertBlock()->getParent();
@@ -1509,7 +1509,7 @@
     if (StepVal == 0) return 0;
   } else {
     // If not specified, use 1.0.
-    StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
+    StepVal = ConstantFP::get(APFloat(1.0));
   }
   
   Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
@@ -1520,7 +1520,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   EndCond = Builder.CreateFCmpONE(EndCond, 
-                                  ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                  ConstantFP::get(APFloat(0.0)),
                                   "loopcond");
   
   // Create the "after loop" block and insert it.

Modified: llvm/trunk/docs/tutorial/LangImpl6.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl6.html?rev=52165&r1=52164&r2=52165&view=diff

==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl6.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl6.html Mon Jun  9 20:52:17 2008
@@ -1364,7 +1364,7 @@
 Value *ErrorV(const char *Str) { Error(Str); return 0; }
 
 Value *NumberExprAST::Codegen() {
-  return ConstantFP::get(Type::DoubleTy, APFloat(Val));
+  return ConstantFP::get(APFloat(Val));
 }
 
 Value *VariableExprAST::Codegen() {
@@ -1435,7 +1435,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   CondV = Builder.CreateFCmpONE(CondV, 
-                                ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                ConstantFP::get(APFloat(0.0)),
                                 "ifcond");
   
   Function *TheFunction = Builder.GetInsertBlock()->getParent();
@@ -1534,7 +1534,7 @@
     if (StepVal == 0) return 0;
   } else {
     // If not specified, use 1.0.
-    StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
+    StepVal = ConstantFP::get(APFloat(1.0));
   }
   
   Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
@@ -1545,7 +1545,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   EndCond = Builder.CreateFCmpONE(EndCond, 
-                                  ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                  ConstantFP::get(APFloat(0.0)),
                                   "loopcond");
   
   // Create the "after loop" block and insert it.

Modified: llvm/trunk/docs/tutorial/LangImpl7.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=52165&r1=52164&r2=52165&view=diff

==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl7.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl7.html Mon Jun  9 20:52:17 2008
@@ -923,7 +923,7 @@
       InitVal = Init->Codegen();
       if (InitVal == 0) return 0;
     } else { // If not specified, use 0.0.
-      InitVal = ConstantFP::get(Type::DoubleTy, APFloat(0.0));
+      InitVal = ConstantFP::get(APFloat(0.0));
     }
     
     AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName);
@@ -1622,7 +1622,7 @@
 
 
 Value *NumberExprAST::Codegen() {
-  return ConstantFP::get(Type::DoubleTy, APFloat(Val));
+  return ConstantFP::get(APFloat(Val));
 }
 
 Value *VariableExprAST::Codegen() {
@@ -1715,7 +1715,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   CondV = Builder.CreateFCmpONE(CondV, 
-                                ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                ConstantFP::get(APFloat(0.0)),
                                 "ifcond");
   
   Function *TheFunction = Builder.GetInsertBlock()->getParent();
@@ -1821,7 +1821,7 @@
     if (StepVal == 0) return 0;
   } else {
     // If not specified, use 1.0.
-    StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
+    StepVal = ConstantFP::get(APFloat(1.0));
   }
   
   // Compute the end condition.
@@ -1836,7 +1836,7 @@
   
   // Convert condition to a bool by comparing equal to 0.0.
   EndCond = Builder.CreateFCmpONE(EndCond, 
-                                  ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
+                                  ConstantFP::get(APFloat(0.0)),
                                   "loopcond");
   
   // Create the "after loop" block and insert it.
@@ -1880,7 +1880,7 @@
       InitVal = Init->Codegen();
       if (InitVal == 0) return 0;
     } else { // If not specified, use 0.0.
-      InitVal = ConstantFP::get(Type::DoubleTy, APFloat(0.0));
+      InitVal = ConstantFP::get(APFloat(0.0));
     }
     
     AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName);





More information about the llvm-commits mailing list