Improve error message when constructing a Tensor with an invalid element type (NFC)
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D86040
This commit is contained in:
parent
516328860c
commit
45cc86b09b
|
@ -300,7 +300,7 @@ ArrayRef<int64_t> VectorType::getShape() const { return getImpl()->getShape(); }
|
|||
static LogicalResult checkTensorElementType(Location location,
|
||||
Type elementType) {
|
||||
if (!TensorType::isValidElementType(elementType))
|
||||
return emitError(location, "invalid tensor element type");
|
||||
return emitError(location, "invalid tensor element type: ") << elementType;
|
||||
return success();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue