diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-29 22:17:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-29 22:17:13 +0000 |
commit | debcb01b0f0a15f568ca69e8f288fade4bfc7297 (patch) | |
tree | 22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/Analysis | |
parent | 37c4a2d6f15ff32c9ae91e333d655a349e195993 (diff) | |
download | llvm-debcb01b0f0a15f568ca69e8f288fade4bfc7297.tar.gz llvm-debcb01b0f0a15f568ca69e8f288fade4bfc7297.tar.bz2 llvm-debcb01b0f0a15f568ca69e8f288fade4bfc7297.tar.xz |
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')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 8 | ||||
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Analysis/LoopVR.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 2 |
4 files changed, 11 insertions, 11 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); diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 3db7ff964c..7ff1de6351 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -470,7 +470,7 @@ DIFactory::DIFactory(Module &m) : M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0), RegionStartFn(0), RegionEndFn(0), DeclareFn(0) { - EmptyStructPtr = VMContext.getPointerTypeUnqual(VMContext.getStructType()); + EmptyStructPtr = PointerType::getUnqual(StructType::get()); } /// getCastToEmpty - Return this descriptor as a Constant* with type '{}*'. @@ -493,7 +493,7 @@ Constant *DIFactory::GetStringConstant(const std::string &String) { // Return Constant if previously defined. if (Slot) return Slot; - const PointerType *DestTy = VMContext.getPointerTypeUnqual(Type::Int8Ty); + const PointerType *DestTy = PointerType::getUnqual(Type::Int8Ty); // If empty string then use a i8* null instead. if (String.empty()) @@ -522,7 +522,7 @@ DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) { for (unsigned i = 0; i != NumTys; ++i) Elts.push_back(getCastToEmpty(Tys[i])); - Constant *Init = ConstantArray::get(VMContext.getArrayType(EmptyStructPtr, + Constant *Init = ConstantArray::get(ArrayType::get(EmptyStructPtr, Elts.size()), Elts.data(), Elts.size()); // If we already have this array, just return the uniqued version. @@ -1075,7 +1075,7 @@ namespace llvm { const Type *Ty = M->getTypeByName("llvm.dbg.global_variable.type"); if (!Ty) return 0; - Ty = Context.getPointerType(Ty, 0); + Ty = PointerType::get(Ty, 0); Value *Val = V->stripPointerCasts(); for (Value::use_iterator I = Val->use_begin(), E = Val->use_end(); diff --git a/lib/Analysis/LoopVR.cpp b/lib/Analysis/LoopVR.cpp index ccd5400df8..8ffac633d0 100644 --- a/lib/Analysis/LoopVR.cpp +++ b/lib/Analysis/LoopVR.cpp @@ -75,8 +75,8 @@ ConstantRange LoopVR::getRange(const SCEV *S, const SCEV *T, ScalarEvolution &SE ConstantRange X = getRange(Mul->getOperand(0), T, SE); if (X.isFullSet()) return FullSet; - const IntegerType *Ty = Context.getIntegerType(X.getBitWidth()); - const IntegerType *ExTy = Context.getIntegerType(X.getBitWidth() * + const IntegerType *Ty = IntegerType::get(X.getBitWidth()); + const IntegerType *ExTy = IntegerType::get(X.getBitWidth() * Mul->getNumOperands()); ConstantRange XExt = X.zeroExtend(ExTy->getBitWidth()); diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 3bf5e70cc1..8c4d191efb 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -4670,7 +4670,7 @@ const SCEV *ScalarEvolution::getBECount(const SCEV *Start, // Check Add for unsigned overflow. // TODO: More sophisticated things could be done here. - const Type *WideTy = getContext().getIntegerType(getTypeSizeInBits(Ty) + 1); + const Type *WideTy = IntegerType::get(getTypeSizeInBits(Ty) + 1); const SCEV *EDiff = getZeroExtendExpr(Diff, WideTy); const SCEV *ERoundUp = getZeroExtendExpr(RoundUp, WideTy); const SCEV *OperandExtendedAdd = getAddExpr(EDiff, ERoundUp); |