Skip to content

Commit 159898d

Browse files
committed
[mlir] Add missing const to cloneWith method.
1 parent 0ef5aa6 commit 159898d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mlir/include/mlir/IR/BuiltinTypes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ def Builtin_Vector : Builtin_Type<"Vector", [
10131013
/// Clone this vector type with the given shape and element type. If the
10141014
/// provided shape is `None`, the current shape of the type is used.
10151015
VectorType cloneWith(Optional<ArrayRef<int64_t>> shape,
1016-
Type elementType);
1016+
Type elementType) const;
10171017
}];
10181018
let skipDefaultBuilders = 1;
10191019
let genVerifyDecl = 1;

mlir/lib/IR/BuiltinTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void VectorType::walkImmediateSubElements(
304304
}
305305

306306
VectorType VectorType::cloneWith(Optional<ArrayRef<int64_t>> shape,
307-
Type elementType) {
307+
Type elementType) const {
308308
return VectorType::get(shape.getValueOr(getShape()), elementType,
309309
getNumScalableDims());
310310
}

0 commit comments

Comments
 (0)