Fabian Mora 913d44da83
[mlir][IR] Fix enum attribute handling by using parseKeywordOrString instead of parseKeyword (#156662)
Change enum attribute parsing to handle special characters and
multi-word
identifiers. This allows enum attrs to use symbols like "+" and strings
with separators like "dash-separated-sentence" instead of being limited
to
valid identifiers. 

This also aligns enum attribute parsing with how enums are already
handled
by the `FieldParser`:

https://github.com/llvm/llvm-project/blob/main/mlir/tools/mlir-tblgen/EnumsGen.cpp#L108

Signed-off-by: Fabian Mora <fabian.mora-cordero@amd.com>
2025-09-03 09:23:42 -04:00
..