[all-commits] [llvm/llvm-project] 913d44: [mlir][IR] Fix enum attribute handling by using pa...
Fabian Mora via All-commits
all-commits at lists.llvm.org
Wed Sep 3 06:24:03 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 913d44da833674be59b1713dfdb1cde8fea2a842
https://github.com/llvm/llvm-project/commit/913d44da833674be59b1713dfdb1cde8fea2a842
Author: Fabian Mora <fmora.dev at gmail.com>
Date: 2025-09-03 (Wed, 03 Sep 2025)
Changed paths:
M mlir/include/mlir/IR/EnumAttr.td
M mlir/test/IR/array-of-attr.mlir
M mlir/test/lib/Dialect/Test/TestEnumDefs.td
M mlir/test/mlir-tblgen/attr-or-type-format-roundtrip.mlir
M mlir/test/mlir-tblgen/attr-or-type-format.td
Log Message:
-----------
[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 at amd.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list