[OpAsmParser] Refactor parseOptionalInteger to support wide integers, NFC.
OpAsmParser (and DialectAsmParser) supports a pair of parseInteger/parseOptionalInteger methods, which allow parsing a bare integer into a C type of your choice (e.g. int8_t) using templates. It was implemented in terms of a virtual method call that is hard coded to int64_t because "that should be big enough". Change the virtual method hook to return an APInt instead. This allows asmparsers for custom ops to parse large integers if they want to, without changing any of the clients of the fixed size C API. Differential Revision: https://reviews.llvm.org/D102120
Loading
Please register or sign in to comment