[Mlir-commits] [mlir] [mlir] Add OpAsmTypeInterface for pretty-print (PR #121187)

Jacques Pienaar llvmlistbot at llvm.org
Mon Jan 13 19:25:38 PST 2025


================
@@ -109,6 +109,31 @@ def OpAsmOpInterface : OpInterface<"OpAsmOpInterface"> {
   ];
 }
 
+//===----------------------------------------------------------------------===//
+// OpAsmTypeInterface
+//===----------------------------------------------------------------------===//
+
+def OpAsmTypeInterface : TypeInterface<"OpAsmTypeInterface"> {
+  let description = [{
+    This interface provides hooks to interact with the AsmPrinter and AsmParser
+    classes.
+  }];
+  let cppNamespace = "::mlir";
+
+  let methods = [
+    InterfaceMethod<[{
+        Get a special name to use when printing value of this type.
----------------
jpienaar wrote:

s/a special//

I know this is not the intent, but `special` feels like a judgement call on value :). Its a name that is used as prefix. I think we also call it name elsewhere and document it as such, else I'd have suggested prefix.

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


More information about the Mlir-commits mailing list