[cfe-commits] r77249 - in /cfe/trunk: include/clang/Analysis/PathSensitive/ lib/CodeGen/ test/CXX/class/class.local/ test/CXX/over/over.over/ test/CXX/temp/temp.decls/temp.class/temp.mem.class/ test/CXX/temp/temp.decls/temp.class/temp.mem.func/ test/CXX/temp/temp.decls/temp.class/temp.static/ test/CXX/temp/temp.fct.spec/temp.arg.explicit/ test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/ test/CodeGenCXX/ test/SemaTemplate/

Owen Anderson resistor at mac.com
Mon Jul 27 14:00:51 PDT 2009


Author: resistor
Date: Mon Jul 27 16:00:51 2009
New Revision: 77249

URL: http://llvm.org/viewvc/llvm-project?rev=77249&view=rev
Log:
Update for LLVM API change.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h
    cfe/trunk/include/clang/Analysis/PathSensitive/CheckerVisitor.h
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp
    cfe/trunk/lib/CodeGen/CGExprComplex.cpp
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp
    cfe/trunk/test/CXX/class/class.local/p4.cpp
    cfe/trunk/test/CXX/over/over.over/p2.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp
    cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp
    cfe/trunk/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
    cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp
    cfe/trunk/test/CodeGenCXX/function-template-specialization.cpp
    cfe/trunk/test/SemaTemplate/implicit-instantiation-1.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h Mon Jul 27 16:00:51 2009
@@ -100,4 +100,4 @@
 } // end clang namespace
 
 #endif
-  
\ No newline at end of file
+  

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/CheckerVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/CheckerVisitor.h?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/CheckerVisitor.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/CheckerVisitor.h Mon Jul 27 16:00:51 2009
@@ -51,4 +51,4 @@
 } // end clang namespace
 
 #endif
-  
\ No newline at end of file
+  

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Mon Jul 27 16:00:51 2009
@@ -66,7 +66,7 @@
       return RValue::get(llvm::ConstantInt::get(VMContext, 
                                                 Result.Val.getInt()));
     else if (Result.Val.isFloat())
-      return RValue::get(VMContext.getConstantFP(Result.Val.getFloat()));
+      return RValue::get(ConstantFP::get(VMContext, Result.Val.getFloat()));
   }
       
   switch (BuiltinID) {

Modified: cfe/trunk/lib/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprComplex.cpp Mon Jul 27 16:00:51 2009
@@ -367,8 +367,6 @@
 
 ComplexPairTy ComplexExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
                                                      bool isInc, bool isPre) {
-  llvm::LLVMContext &VMContext = CGF.getLLVMContext();
-
   LValue LV = CGF.EmitLValue(E->getSubExpr());
   ComplexPairTy InVal = EmitLoadOfComplex(LV.getAddress(),
                                           LV.isVolatileQualified());
@@ -386,7 +384,7 @@
     llvm::APFloat FVal(CGF.getContext().getFloatTypeSemantics(ElemTy), 1);
     if (!isInc)
       FVal.changeSign();
-    NextVal = VMContext.getConstantFP(FVal);
+    NextVal = llvm::ConstantFP::get(CGF.getLLVMContext(), FVal);
     
     // Add the inc/dec to the real part.
     NextVal = Builder.CreateFAdd(InVal.first, NextVal, isInc ? "inc" : "dec");

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Mon Jul 27 16:00:51 2009
@@ -879,12 +879,14 @@
       return VMContext.getConstantStruct(Complex, 2);
     }
     case APValue::Float:
-      return VMContext.getConstantFP(Result.Val.getFloat());
+      return llvm::ConstantFP::get(VMContext, Result.Val.getFloat());
     case APValue::ComplexFloat: {
       llvm::Constant *Complex[2];
       
-      Complex[0] = VMContext.getConstantFP(Result.Val.getComplexFloatReal());
-      Complex[1] = VMContext.getConstantFP(Result.Val.getComplexFloatImag());
+      Complex[0] = llvm::ConstantFP::get(VMContext, 
+                                         Result.Val.getComplexFloatReal());
+      Complex[1] = llvm::ConstantFP::get(VMContext,
+                                         Result.Val.getComplexFloatImag());
       
       return VMContext.getConstantStruct(Complex, 2);
     }
@@ -897,7 +899,7 @@
         if (Elt.isInt())
           Inits.push_back(llvm::ConstantInt::get(VMContext, Elt.getInt()));
         else
-          Inits.push_back(VMContext.getConstantFP(Elt.getFloat()));
+          Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat()));
       }
       return VMContext.getConstantVector(&Inits[0], Inits.size());
     }

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Mon Jul 27 16:00:51 2009
@@ -112,7 +112,7 @@
     return llvm::ConstantInt::get(VMContext, E->getValue());
   }
   Value *VisitFloatingLiteral(const FloatingLiteral *E) {
-    return VMContext.getConstantFP(E->getValue());
+    return llvm::ConstantFP::get(VMContext, E->getValue());
   }
   Value *VisitCharacterLiteral(const CharacterLiteral *E) {
     return llvm::ConstantInt::get(ConvertType(E->getType()), E->getValue());
@@ -731,16 +731,18 @@
     // Add the inc/dec to the real part.
     if (InVal->getType() == llvm::Type::FloatTy)
       NextVal = 
-        VMContext.getConstantFP(llvm::APFloat(static_cast<float>(AmountVal)));
+        llvm::ConstantFP::get(VMContext, 
+                              llvm::APFloat(static_cast<float>(AmountVal)));
     else if (InVal->getType() == llvm::Type::DoubleTy)
       NextVal = 
-        VMContext.getConstantFP(llvm::APFloat(static_cast<double>(AmountVal)));
+        llvm::ConstantFP::get(VMContext,
+                              llvm::APFloat(static_cast<double>(AmountVal)));
     else {
       llvm::APFloat F(static_cast<float>(AmountVal));
       bool ignored;
       F.convert(CGF.Target.getLongDoubleFormat(), llvm::APFloat::rmTowardZero,
                 &ignored);
-      NextVal = VMContext.getConstantFP(F);
+      NextVal = llvm::ConstantFP::get(VMContext, F);
     }
     NextVal = Builder.CreateFAdd(InVal, NextVal, isInc ? "inc" : "dec");
   }

Modified: cfe/trunk/test/CXX/class/class.local/p4.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.local/p4.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/class/class.local/p4.cpp (original)
+++ cfe/trunk/test/CXX/class/class.local/p4.cpp Mon Jul 27 16:00:51 2009
@@ -7,4 +7,4 @@
     
     static void f() { }
   };
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CXX/over/over.over/p2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/over/over.over/p2.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/over/over.over/p2.cpp (original)
+++ cfe/trunk/test/CXX/over/over.over/p2.cpp Mon Jul 27 16:00:51 2009
@@ -7,4 +7,4 @@
   int (*f0b)(int, int) = &f0;
   int (*f0c)(int, float) = f0; // expected-error{{incompatible type}}
   // FIXME: poor error message above!
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp Mon Jul 27 16:00:51 2009
@@ -24,4 +24,4 @@
   inner2.x = &i;
   inner2.y = &f;
   inner2.f(); // expected-note{{instantiation}}
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp Mon Jul 27 16:00:51 2009
@@ -9,4 +9,4 @@
 };
 
 template<typename T>
-typename X0<T>::size_type X0<T>::f0() const { }
\ No newline at end of file
+typename X0<T>::size_type X0<T>::f0() const { }

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp Mon Jul 27 16:00:51 2009
@@ -14,4 +14,4 @@
 void test_f(X0<float, int> xfi, X0<void, int> xvi, float *fp, void *vp, int i) {
   xfi.f(fp, i);
   xvi.f(vp, i); // expected-note{{instantiation}}
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp Mon Jul 27 16:00:51 2009
@@ -25,4 +25,4 @@
   
 CannotInit &returnError() {
   return X<CannotInit>::value; // expected-note{{instantiation}}
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp Mon Jul 27 16:00:51 2009
@@ -23,4 +23,4 @@
   return X0<X2>::value; // expected-note{{instantiation}}
 }
   
-template<typename T> T x; // expected-error{{variable 'x' declared as a template}}
\ No newline at end of file
+template<typename T> T x; // expected-error{{variable 'x' declared as a template}}

Modified: cfe/trunk/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp Mon Jul 27 16:00:51 2009
@@ -8,4 +8,4 @@
   f<int>("aa",3.0);       // Y is deduced to be char*, and
                           // Z is deduced to be double 
   f("aa",3.0); // expected-error{{no matching}}
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp Mon Jul 27 16:00:51 2009
@@ -19,4 +19,4 @@
   float (*f1d)(float) = (f1);
   float (*f1e)(float) = &f1;
   float (*f1f)(float) = (&f1);
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CodeGenCXX/function-template-specialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/function-template-specialization.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenCXX/function-template-specialization.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/function-template-specialization.cpp Mon Jul 27 16:00:51 2009
@@ -24,4 +24,4 @@
   // FIXME: should be "_Z4nextIdiEPT_S1_RKT0_"
   // RUN: grep "_Z4nextIdiEPdPdRKi" %t
   dptr = next(dptr, diff);
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/SemaTemplate/implicit-instantiation-1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/implicit-instantiation-1.cpp?rev=77249&r1=77248&r2=77249&view=diff

==============================================================================
--- cfe/trunk/test/SemaTemplate/implicit-instantiation-1.cpp (original)
+++ cfe/trunk/test/SemaTemplate/implicit-instantiation-1.cpp Mon Jul 27 16:00:51 2009
@@ -22,4 +22,4 @@
   char* cp2 = add(cp, i);
   add(cp, cp); // expected-note{{instantiation of}}
   (void)sizeof(add(ip, ip));
-}
\ No newline at end of file
+}





More information about the cfe-commits mailing list