[all-commits] [llvm/llvm-project] c1d02b: [mlir] Change end of OperationDefinition. (#77273)
Jacques Pienaar via All-commits
all-commits at lists.llvm.org
Wed Jan 10 10:41:17 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c1d02bd1479e669f6622f3f9b5b52423ae9631a1
https://github.com/llvm/llvm-project/commit/c1d02bd1479e669f6622f3f9b5b52423ae9631a1
Author: Jacques Pienaar <jpienaar at google.com>
Date: 2024-01-10 (Wed, 10 Jan 2024)
Changed paths:
M mlir/lib/AsmParser/Parser.cpp
M mlir/lib/AsmParser/Parser.h
M mlir/lib/AsmParser/ParserState.h
Log Message:
-----------
[mlir] Change end of OperationDefinition. (#77273)
Store the last token parsed in the parser state so that the range parsed
can utilize its end rather than the start of the token after parsed.
This results in a tighter range (especially true in the case of
comments, see
```mlir
|%c4 = arith.constant 4 : index
// Foo
|
```
vs
```mlir
|%c4 = arith.constant 4 : index|
```
).
Discovered while working on a little textual post processing tool.
More information about the All-commits
mailing list