mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 19:18:13 +08:00
This function simplifies calling the getChecked methods on Attributes and Types from within the parser, and removes any need to use `getEncodedSourceLocation` for these methods (by using an SMLoc instead). This is much more efficient than using an mlir::Location, as the encoding process to produce an mlir::Location is inefficient and undesirable for parsing (locations used during parsing should not persist afterwards unless otherwise necessary). Differential Revision: https://reviews.llvm.org/D97900