diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h --- a/llvm/include/llvm/IR/Type.h +++ b/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(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