mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 16:35:10 +00:00
Add Type::isIntOrIntVector, like Type::isFPOrFPVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7abff31957
commit
ef1af7d6d5
@ -180,6 +180,11 @@ public:
|
||||
///
|
||||
bool isInteger() const { return ID == IntegerTyID; }
|
||||
|
||||
/// isIntOrIntVector - Return true if this is an integer type or a vector of
|
||||
/// integer types.
|
||||
///
|
||||
bool isIntOrIntVector() const;
|
||||
|
||||
/// isFloatingPoint - Return true if this is one of the two floating point
|
||||
/// types
|
||||
bool isFloatingPoint() const { return ID == FloatTyID || ID == DoubleTyID ||
|
||||
|
@ -126,6 +126,17 @@ const Type *Type::getVAArgsPromotedType() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
/// isIntOrIntVector - Return true if this is an integer type or a vector of
|
||||
/// integer types.
|
||||
///
|
||||
bool Type::isIntOrIntVector() const {
|
||||
if (isInteger())
|
||||
return true;
|
||||
if (ID != Type::VectorTyID) return false;
|
||||
|
||||
return cast<VectorType>(this)->getElementType()->isInteger();
|
||||
}
|
||||
|
||||
/// isFPOrFPVector - Return true if this is a FP type or a vector of FP types.
|
||||
///
|
||||
bool Type::isFPOrFPVector() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user