[Mlir-commits] [mlir] [mlir] Decouple enum generation from attributes, adding EnumInfo and EnumCase (PR #132148)

Matthias Springer llvmlistbot at llvm.org
Fri Mar 21 03:01:09 PDT 2025


================
@@ -128,8 +143,95 @@ namespace llvm {
 inline ::llvm::raw_ostream &operator<<(::llvm::raw_ostream &p, {0} value) {{
   auto valueStr = stringifyEnum(value);
 )";
-  os << formatv(parsedAndPrinterStart, qualName, cppNamespace,
-                enumAttr.getSummary());
+
+  const char *parsedAndPrinterStartUnquotedBitEnum = R"(
+  namespace mlir {
+  template <typename T, typename>
+  struct FieldParser;
+
+  template<>
+  struct FieldParser<{0}, {0}> {{
----------------
matthias-springer wrote:

How was this handled before? I expected that this is would replace another `FieldParser` implementation.

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


More information about the Mlir-commits mailing list