Reviewed By: nikic, jcranmer-intel
Differential Revision: https://reviews.llvm.org/D136768
bool VectorType::isValidElementType(Type *ElemTy) {
return ElemTy->isIntegerTy() || ElemTy->isFloatingPointTy() ||
- ElemTy->isPointerTy();
+ ElemTy->isPointerTy() || ElemTy->getTypeID() == TypedPointerTyID;
}
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
static inline Type *checkType(Type *Ty) {
assert(Ty && "Value defined with a null type: Error!");
- assert(!isa<TypedPointerType>(Ty) &&
+ assert(!isa<TypedPointerType>(Ty->getScalarType()) &&
"Cannot have values with typed pointer types");
return Ty;
}