forked from OSchip/llvm-project
[mlir][NFC] Use `BaseMemRefType::isValidElementType` in Parser
Instead of hard-coded check. Reviewed By: ftynse, rriddle Differential Revision: https://reviews.llvm.org/D97612
This commit is contained in:
parent
b6ac26fce5
commit
e3b350ce83
|
@ -219,8 +219,7 @@ Type Parser::parseMemRefType() {
|
|||
return nullptr;
|
||||
|
||||
// Check that memref is formed from allowed types.
|
||||
if (!elementType.isIntOrIndexOrFloat() &&
|
||||
!elementType.isa<VectorType, ComplexType>())
|
||||
if (!BaseMemRefType::isValidElementType(elementType))
|
||||
return emitError(typeLoc, "invalid memref element type"), nullptr;
|
||||
|
||||
// Parse semi-affine-map-composition.
|
||||
|
|
Loading…
Reference in New Issue