-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Fix 'parse_single_type' for operands/results directives (#3553)
Reworks the way 'parse_single_type' works for operands/results directives, reusing the infrastructure introduced for 'parse_many_types'. This now allows 'parse_single_type' to work when there are variadic operands, as demonstrated by the new tests. The new tests manually make a `FormatProgram`, as the format program parser will never generate such a program. This currently makes no difference, as these functions are never called, but it will be important for the functional-type directive (#3517), as it allows a type like: ```mlir (i32, i32) -> i32 ``` to be parsed, even if the results of the operation is a variadic (the functional type directive calls 'parse_single_type' when the results are not wrapped in parentheses).
- Loading branch information
Showing
2 changed files
with
158 additions
and
6 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