diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h --- a/llvm/include/llvm/IR/DerivedTypes.h +++ b/llvm/include/llvm/IR/DerivedTypes.h @@ -531,6 +531,8 @@ } }; +bool Type::isVectorTy() const { return isa(this); } + /// Class to represent pointers. class PointerType : public Type { explicit PointerType(Type *ElType, unsigned AddrSpace); 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 @@ -223,7 +223,7 @@ 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