mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
Add a new predicate for integer type equality tests.
llvm-svn: 92759
This commit is contained in:
parent
19324a5b81
commit
6a11532b00
@ -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…
Reference in New Issue
Block a user