[mlir][flang] Do not prevent integer types from being parsed as MLIR keywords
DialectAsmParser::parseKeyword is rejecting `'i' digit+` while it is a valid identifier according to mlir/docs/LangRef.md. Integer types actually used to be TOK_KEYWORD a while back before the change: https://github.com/llvm/llvm-project/commit/6af866c58d21813fb243906611d02bb2a8ffa43a. This patch Modifies `isCurrentTokenAKeyword` to return true for tokens that match integer types too. The motivation for this change is the parsing of `!fir.type<{` `component-name: component-type,`+ `}>` type in FIR that represent Fortran derived types. The component-names are parsed as keywords, and can very well be i32 or any ixxx (which are valid Fortran derived type component names). The Quant dialect type parser had to be modified since it relied on `iw` not being parsed as keywords. Differential Revision: https://reviews.llvm.org/D108913
Loading
Please sign in to comment