[mlir][sparse] Improving error-detection for STEA::get{Pos,Crd}Type
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D150995
This commit is contained in:
@@ -254,10 +254,12 @@ Type mlir::sparse_tensor::detail::getIntegerOrIndexType(MLIRContext *ctx,
|
||||
}
|
||||
|
||||
Type SparseTensorEncodingAttr::getPosType() const {
|
||||
assert(getImpl() && "Uninitialized SparseTensorEncodingAttr");
|
||||
return detail::getIntegerOrIndexType(getContext(), getPosWidth());
|
||||
}
|
||||
|
||||
Type SparseTensorEncodingAttr::getCrdType() const {
|
||||
assert(getImpl() && "Uninitialized SparseTensorEncodingAttr");
|
||||
return detail::getIntegerOrIndexType(getContext(), getCrdWidth());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user