forked from OSchip/llvm-project
![]() This diff allows the EnumAttr class to be used for bit enum attributes (in addition to previously supported integer enum attributes). While integer and bit enum attributes share many common implementation aspects, parsing bit enum values requires a separate implementation. This is accomplished by creating empty parser and printer strings in the EnumAttrInfo record, and having derived classes (specific to bit and integer enums) override with an appropriate parser/printer string. To support existing bit enums that may use a vertical bar separator, the parser is modified to support the | token. Tests were added for bit enums alongside integer enums. Future diffs for fastmath attributes in the arithmetic dialect will use these changes. (resubmission of earlier abaondoned diff, updated to reflect subsequent changes in the repository) Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D123880 |
||
---|---|---|
.. | ||
AffineParser.cpp | ||
AsmParserImpl.h | ||
AsmParserState.cpp | ||
AttributeParser.cpp | ||
CMakeLists.txt | ||
DialectSymbolParser.cpp | ||
Lexer.cpp | ||
Lexer.h | ||
LocationParser.cpp | ||
Parser.cpp | ||
Parser.h | ||
ParserState.h | ||
Token.cpp | ||
Token.h | ||
TokenKinds.def | ||
TypeParser.cpp |