Skip to content

Commit 45cc86b

Browse files
committed
Improve error message when constructing a Tensor with an invalid element type (NFC)
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D86040
1 parent 5163288 commit 45cc86b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/IR/StandardTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ ArrayRef<int64_t> VectorType::getShape() const { return getImpl()->getShape(); }
300300
static LogicalResult checkTensorElementType(Location location,
301301
Type elementType) {
302302
if (!TensorType::isValidElementType(elementType))
303-
return emitError(location, "invalid tensor element type");
303+
return emitError(location, "invalid tensor element type: ") << elementType;
304304
return success();
305305
}
306306

0 commit comments

Comments
 (0)