[PATCH] D77425: [NFC] Make Type::isVectorTy call isa<VectorType>
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 12:26:18 PDT 2020
ctetreau created this revision.
Herald added subscribers: llvm-commits, tschuett.
Herald added a project: LLVM.
ctetreau added reviewers: sdesmalen, efriedma, dexonsmith.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77425
Files:
llvm/include/llvm/IR/Type.h
Index: llvm/include/llvm/IR/Type.h
===================================================================
--- llvm/include/llvm/IR/Type.h
+++ llvm/include/llvm/IR/Type.h
@@ -34,6 +34,7 @@
class PointerType;
class raw_ostream;
class StringRef;
+class VectorType;
/// The instances of the Type class are immutable: once they are created,
/// they are never changed. Also note that only one instance of a particular
@@ -227,7 +228,7 @@
bool isPtrOrPtrVectorTy() const { return getScalarType()->isPointerTy(); }
/// True if this is an instance of VectorType.
- bool isVectorTy() const { return getTypeID() == VectorTyID; }
+ bool isVectorTy() const { return isa<VectorType>(this); }
/// 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77425.254882.patch
Type: text/x-patch
Size: 854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200403/5618636f/attachment.bin>
More information about the llvm-commits
mailing list