mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-29 14:42:01 +00:00
Add a new predicate for integer type equality tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6786d5e183
commit
13be48701d
@ -217,6 +217,9 @@ public:
|
||||
///
|
||||
bool isInteger() const { return ID == IntegerTyID; }
|
||||
|
||||
/// isInteger - Return true if this is an IntegerType of the specified width.
|
||||
bool isInteger(unsigned Bitwidth) const;
|
||||
|
||||
/// isIntOrIntVector - Return true if this is an integer type or a vector of
|
||||
/// integer types.
|
||||
///
|
||||
|
@ -124,6 +124,11 @@ const Type *Type::getScalarType() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
/// isInteger - Return true if this is an IntegerType of the specified width.
|
||||
bool Type::isInteger(unsigned Bitwidth) const {
|
||||
return isInteger() && cast<IntegerType>(this)->getBitWidth() == Bitwidth;
|
||||
}
|
||||
|
||||
/// isIntOrIntVector - Return true if this is an integer type or a vector of
|
||||
/// integer types.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user