aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
commitdebcb01b0f0a15f568ca69e8f288fade4bfc7297 (patch)
tree22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/Analysis/ConstantFolding.cpp
parent37c4a2d6f15ff32c9ae91e333d655a349e195993 (diff)
Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r--lib/Analysis/ConstantFolding.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index 1f034e9862..126f850331 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -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);