[MLIR] Enable conversion from llvm::SMLoc to mlir::Location with OpAsmParser.
authorUlysse Beaugnon <ulysse@google.com>
Wed, 12 May 2021 07:07:44 +0000 (09:07 +0200)
committerAlex Zinenko <zinenko@google.com>
Wed, 12 May 2021 07:08:32 +0000 (09:08 +0200)
commit27b2bd76017f5b486b96ad782bfb28e1b28b5088
tree46c9a226719189a097bba339a36d70a095f5bbcb
parent9a0ea5994bdc477d77fd4d9f4eb5d34b1ac4184a
[MLIR] Enable conversion from llvm::SMLoc to mlir::Location with OpAsmParser.

DialectAsmParser already allows converting an llvm::SMLoc location to a
mlir::Location location. This commit adds the same functionality to OpAsmParser.
Implementation is copied from DialectAsmParser.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D102165
mlir/include/mlir/IR/OpImplementation.h
mlir/lib/Parser/Parser.cpp