[mlir] Fix a deprecation warning
authorKazu Hirata <kazu@google.com>
Tue, 17 Jan 2023 21:12:40 +0000 (13:12 -0800)
committerKazu Hirata <kazu@google.com>
Tue, 17 Jan 2023 21:12:40 +0000 (13:12 -0800)
This patch fixes:

  mlir/include/mlir/Dialect/Affine/LoopUtils.h:332:25: error:
  'makeMutableArrayRef<mlir::scf::ForOp>' is deprecated: Use deduction
  guide instead [-Werror,-Wdeprecated-declarations]

mlir/include/mlir/Dialect/Affine/LoopUtils.h

index f598625..828f061 100644 (file)
@@ -329,7 +329,7 @@ LogicalResult coalescePerfectlyNestedLoops(LoopOpTy op) {
         continue;
       assert(maxPos == start &&
              "expected loop bounds to be known at the start of the band");
-      auto band = llvm::makeMutableArrayRef(loops.data() + start, end - start);
+      auto band = llvm::MutableArrayRef(loops.data() + start, end - start);
       if (succeeded(coalesceLoops(band)))
         result = success();
       break;