[NFC] Make Type::isVectorTy call isa<VectorType>

Reviewers: sdesmalen, efriedma, dexonsmith

Reviewed By: efriedma

Subscribers: tschuett, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77425
This commit is contained in:
Christopher Tetreault 2020-04-09 13:52:54 -07:00
parent 2d39559d68
commit 994d84b919
2 changed files with 3 additions and 1 deletions

View File

@ -543,6 +543,8 @@ ElementCount Type::getVectorElementCount() const {
return cast<VectorType>(this)->getElementCount();
}
bool Type::isVectorTy() const { return isa<VectorType>(this); }
/// Class to represent pointers.
class PointerType : public Type {
explicit PointerType(Type *ElType, unsigned AddrSpace);

View File

@ -223,7 +223,7 @@ public:
bool isPtrOrPtrVectorTy() const { return getScalarType()->isPointerTy(); }
/// True if this is an instance of VectorType.
bool isVectorTy() const { return getTypeID() == VectorTyID; }
inline bool isVectorTy() const;
/// Return true if this type could be converted with a lossless BitCast to
/// type 'Ty'. For example, i8* to i32*. BitCasts are valid for types of the