[Mlir-commits] [mlir] [mlir][IR] Support op interfaces in `HasParent` trait (PR #91471)

Matthias Springer llvmlistbot at llvm.org
Wed May 8 06:46:26 PDT 2024


================
@@ -1309,6 +1311,25 @@ struct HasParent {
       return llvm::cast<ParentOpType>(parent);
     }
   };
+
+private:
+  /// A class is an op interface if it has a `getInterfaceName` function.
----------------
matthias-springer wrote:

Ops and op interfaces inherit from `OpState`. If you know a better way of checking if a class is an interface, let me know. I also thought about calling the function `getOperationName` instead of `getInterfaceName`, but that could be confusing.


https://github.com/llvm/llvm-project/pull/91471


More information about the Mlir-commits mailing list