From bd47f59afa52732c0518f222b061c00fc62cae19 Mon Sep 17 00:00:00 2001 From: Stepan Dyatkovskiy Date: Tue, 3 Jan 2012 14:05:04 +0000 Subject: Type: replaced usage of ID with getTypeID(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147446 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Type.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/VMCore/Type.cpp') diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index d19dc06caa..fe07e9e12e 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -66,7 +66,7 @@ bool Type::isIntegerTy(unsigned Bitwidth) const { bool Type::isIntOrIntVectorTy() const { if (isIntegerTy()) return true; - if (ID != Type::VectorTyID) return false; + if (getTypeID() != Type::VectorTyID) return false; return cast(this)->getElementType()->isIntegerTy(); } @@ -74,11 +74,12 @@ bool Type::isIntOrIntVectorTy() const { /// isFPOrFPVectorTy - Return true if this is a FP type or a vector of FP types. /// bool Type::isFPOrFPVectorTy() const { - if (ID == Type::HalfTyID || ID == Type::FloatTyID || ID == Type::DoubleTyID || - ID == Type::FP128TyID || ID == Type::X86_FP80TyID || - ID == Type::PPC_FP128TyID) + if (getTypeID() == Type::HalfTyID || getTypeID() == Type::FloatTyID || + getTypeID() == Type::DoubleTyID || + getTypeID() == Type::FP128TyID || getTypeID() == Type::X86_FP80TyID || + getTypeID() == Type::PPC_FP128TyID) return true; - if (ID != Type::VectorTyID) return false; + if (getTypeID() != Type::VectorTyID) return false; return cast(this)->getElementType()->isFloatingPointTy(); } @@ -167,12 +168,12 @@ int Type::getFPMantissaWidth() const { if (const VectorType *VTy = dyn_cast(this)) return VTy->getElementType()->getFPMantissaWidth(); assert(isFloatingPointTy() && "Not a floating point type!"); - if (ID == HalfTyID) return 11; - if (ID == FloatTyID) return 24; - if (ID == DoubleTyID) return 53; - if (ID == X86_FP80TyID) return 64; - if (ID == FP128TyID) return 113; - assert(ID == PPC_FP128TyID && "unknown fp type"); + if (getTypeID() == HalfTyID) return 11; + if (getTypeID() == FloatTyID) return 24; + if (getTypeID() == DoubleTyID) return 53; + if (getTypeID() == X86_FP80TyID) return 64; + if (getTypeID() == FP128TyID) return 113; + assert(getTypeID() == PPC_FP128TyID && "unknown fp type"); return -1; } -- cgit v1.2.3