-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MLIR] Imporve location tracking for
parseElementsLiteralType
(#127992
) This commit improves line location tracking in case of error reporting to the user in `parseElementsLiteralType`. There are two cases: the type is already parsed [1] or not yet parsed [2]. With these changes we print the error at the attribute's location in both cases to ensure consistency. Case 1) ```mlir memref<i32> = dense<[3]> ^ ``` Case 2) ```mlir dense<[3]> : memref<i32> ^ ``` Note that today for a simple: ```mlir func.func @main() { %0 = arith.constant dense<[3]> : i32 return } ``` we print the error after the constant: ``` ./bin/c.mlir:3:3: error: elements literal must be a shaped type return ^ ```
- Loading branch information
Showing
3 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters