[Mlir-commits] [mlir] [MLIR][Python] Fix typeid support for DynamicType and DynamicAttr (PR #183076)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 24 18:46:50 PST 2026


================
@@ -1436,6 +1443,15 @@ void PyDynamicAttribute::bindDerived(ClassTy &c) {
     return std::string(dialectNamespace.data, dialectNamespace.length) + "." +
            std::string(name.data, name.length);
   });
+  c.def_static(
+      "get_typeid",
----------------
PragmaTwice wrote:

We should not override `typeid` because it works well without overriding.

We should not override `static_typeid` because we need the actual type name and an active context to get a typeid for dynamic types.

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


More information about the Mlir-commits mailing list