[Mlir-commits] [mlir] 159898d - [mlir] Add missing const to cloneWith method.

Adrian Kuegel llvmlistbot at llvm.org
Thu Jan 13 00:40:53 PST 2022


Author: Adrian Kuegel
Date: 2022-01-13T09:40:29+01:00
New Revision: 159898d56827abd757509de94e96edb9b53a7446

URL: https://github.com/llvm/llvm-project/commit/159898d56827abd757509de94e96edb9b53a7446
DIFF: https://github.com/llvm/llvm-project/commit/159898d56827abd757509de94e96edb9b53a7446.diff

LOG: [mlir] Add missing const to cloneWith method.

Added: 
    

Modified: 
    mlir/include/mlir/IR/BuiltinTypes.td
    mlir/lib/IR/BuiltinTypes.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/BuiltinTypes.td b/mlir/include/mlir/IR/BuiltinTypes.td
index d646688a08fea..8b67eecda6dc2 100644
--- a/mlir/include/mlir/IR/BuiltinTypes.td
+++ b/mlir/include/mlir/IR/BuiltinTypes.td
@@ -1013,7 +1013,7 @@ def Builtin_Vector : Builtin_Type<"Vector", [
     /// Clone this vector type with the given shape and element type. If the
     /// provided shape is `None`, the current shape of the type is used.
     VectorType cloneWith(Optional<ArrayRef<int64_t>> shape,
-                         Type elementType);
+                         Type elementType) const;
   }];
   let skipDefaultBuilders = 1;
   let genVerifyDecl = 1;

diff  --git a/mlir/lib/IR/BuiltinTypes.cpp b/mlir/lib/IR/BuiltinTypes.cpp
index 4d3e44ff761d8..21d3b64d2be89 100644
--- a/mlir/lib/IR/BuiltinTypes.cpp
+++ b/mlir/lib/IR/BuiltinTypes.cpp
@@ -304,7 +304,7 @@ void VectorType::walkImmediateSubElements(
 }
 
 VectorType VectorType::cloneWith(Optional<ArrayRef<int64_t>> shape,
-                                 Type elementType) {
+                                 Type elementType) const {
   return VectorType::get(shape.getValueOr(getShape()), elementType,
                          getNumScalableDims());
 }


        


More information about the Mlir-commits mailing list