[Mlir-commits] [mlir] [mlir][StorageUniquer] Restore old signature for default implementaion of verifyInvariants. (PR #103023)

Benjamin Chetioui llvmlistbot at llvm.org
Tue Aug 13 01:55:29 PDT 2024


https://github.com/bchetioui updated https://github.com/llvm/llvm-project/pull/103023

>From f491fe008e5ec3f2b9b6d012dd636d522b756c96 Mon Sep 17 00:00:00 2001
From: Benjamin Chetioui <bchetioui at google.com>
Date: Tue, 13 Aug 2024 08:44:10 +0000
Subject: [PATCH] [mlir][StorageUniquer] Restore old signature for default
 implementation of verifyInvariants.

PR #102326 changed the prototype of the default implementation of
verify to include emitErrorFn.

This breaks automatic derivation in consumer attributes, such as
https://github.com/tensorflow/runtime/blob/60277ba976739502e45ad26585e071568fa44af1/include/tfrt/core_runtime/opdefs/attributes.h#L53.

This PR simply restores the signature to what it was prior to PR #102326.
---
 mlir/include/mlir/IR/StorageUniquerSupport.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mlir/include/mlir/IR/StorageUniquerSupport.h b/mlir/include/mlir/IR/StorageUniquerSupport.h
index d6ccbbd8579947..2162a74a51580a 100644
--- a/mlir/include/mlir/IR/StorageUniquerSupport.h
+++ b/mlir/include/mlir/IR/StorageUniquerSupport.h
@@ -226,9 +226,7 @@ class StorageUserBase : public BaseT, public Traits<ConcreteT>... {
 
   /// Default implementation that just returns success.
   template <typename... Args>
-  static LogicalResult
-  verifyInvariants(function_ref<InFlightDiagnostic()> emitErrorFn,
-                   Args... args) {
+  static LogicalResult verifyInvariants(Args... args) {
     return success();
   }
 



More information about the Mlir-commits mailing list