Skip to content

Commit 994d84b

Browse files
[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
1 parent 2d39559 commit 994d84b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

llvm/include/llvm/IR/DerivedTypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ ElementCount Type::getVectorElementCount() const {
543543
return cast<VectorType>(this)->getElementCount();
544544
}
545545

546+
bool Type::isVectorTy() const { return isa<VectorType>(this); }
547+
546548
/// Class to represent pointers.
547549
class PointerType : public Type {
548550
explicit PointerType(Type *ElType, unsigned AddrSpace);

llvm/include/llvm/IR/Type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class Type {
223223
bool isPtrOrPtrVectorTy() const { return getScalarType()->isPointerTy(); }
224224

225225
/// True if this is an instance of VectorType.
226-
bool isVectorTy() const { return getTypeID() == VectorTyID; }
226+
inline bool isVectorTy() const;
227227

228228
/// Return true if this type could be converted with a lossless BitCast to
229229
/// type 'Ty'. For example, i8* to i32*. BitCasts are valid for types of the

0 commit comments

Comments
 (0)