Move types back to the 2.5 API.
[oota-llvm.git] / lib / Analysis / ConstantFolding.cpp
index 1f034e9862d012d7915d38f3f45e625b5c0016b7..126f850331026bae4a89b006ae196cd3e98b9633 100644 (file)
@@ -184,8 +184,8 @@ static Constant *FoldBitCast(Constant *C, const Type *DestTy,
       if (DstEltTy->isFloatingPoint()) {
         // Fold to an vector of integers with same size as our FP type.
         unsigned FPWidth = DstEltTy->getPrimitiveSizeInBits();
-        const Type *DestIVTy = Context.getVectorType(
-                                   Context.getIntegerType(FPWidth), NumDstElt);
+        const Type *DestIVTy = VectorType::get(
+                                   IntegerType::get(FPWidth), NumDstElt);
         // Recursively handle this integer conversion, if possible.
         C = FoldBitCast(C, DestIVTy, TD, Context);
         if (!C) return 0;
@@ -198,8 +198,8 @@ static Constant *FoldBitCast(Constant *C, const Type *DestTy,
       // it to integer first.
       if (SrcEltTy->isFloatingPoint()) {
         unsigned FPWidth = SrcEltTy->getPrimitiveSizeInBits();
-        const Type *SrcIVTy = Context.getVectorType(
-                                   Context.getIntegerType(FPWidth), NumSrcElt);
+        const Type *SrcIVTy = VectorType::get(
+                                   IntegerType::get(FPWidth), NumSrcElt);
         // Ask VMCore to do the conversion now that #elts line up.
         C = ConstantExpr::getBitCast(C, SrcIVTy);
         CV = dyn_cast<ConstantVector>(C);