diff options
author | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-01-03 14:05:04 +0000 |
---|---|---|
committer | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-01-03 14:05:04 +0000 |
commit | bd47f59afa52732c0518f222b061c00fc62cae19 (patch) | |
tree | 4da54c5ad27fecc76e7be0f28484e46cfc8eaea7 /lib/VMCore/Type.cpp | |
parent | ce58a03587ca46d9c9fe48e2bf433bcd57bb2b3a (diff) | |
download | llvm-bd47f59afa52732c0518f222b061c00fc62cae19.tar.gz llvm-bd47f59afa52732c0518f222b061c00fc62cae19.tar.bz2 llvm-bd47f59afa52732c0518f222b061c00fc62cae19.tar.xz |
Type: replaced usage of ID with getTypeID().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r-- | lib/VMCore/Type.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
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<VectorType>(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<VectorType>(this)->getElementType()->isFloatingPointTy(); } @@ -167,12 +168,12 @@ int Type::getFPMantissaWidth() const { if (const VectorType *VTy = dyn_cast<VectorType>(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; } |