Commit 0f052a9
authored
[mlir] Make
The current printer of `StringRefParameter` simply prints out the
content of the string as is without escaping it any way. This leads to
it generating invalid syntax, causing parser errors when read in again.
This PR fixes that by adding `printString` to `AsmPrinter`, allowing one
to print a string that can be parsed with `parseString`, using the same
escaping syntax as `StringAttr`.StringRefParameter roundtrippable (#65813)1 parent 743659b commit 0f052a9
File tree
4 files changed
+17
-2
lines changed- mlir
- include/mlir/IR
- lib/IR
- test/mlir-tblgen
4 files changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
| |||
919 | 920 | | |
920 | 921 | | |
921 | 922 | | |
| 923 | + | |
922 | 924 | | |
923 | 925 | | |
924 | 926 | | |
| |||
2767 | 2769 | | |
2768 | 2770 | | |
2769 | 2771 | | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
2770 | 2779 | | |
2771 | 2780 | | |
2772 | 2781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
0 commit comments