Commit 3e4b95f
committed
ASTMangler: Fix substitution round-tripping in the DWARF mangler
When mangling sugared types for DWARF debug info, we would
occassionally mix generic parameter types from different
generic environments. Since the mangling for a generic
parameter type only recorded the depth and the index, even
for distinct sugared forms, the remangler would produce a
more 'compact' mangling, by folding together generic parameters
that have the same depth/index, but distinct sugarings in the
AST.
Prevent this from happening by desugaring DWARF types the
correct amount, substituting away generic parameters while
preserving everything else.
Also, re-enable the round-trip verification with the remangler.
Fixes <rdar://problem/59496022>, <https://bugs.swift.org/browse/SR-12204>.1 parent 549f630 commit 3e4b95f
File tree
3 files changed
+39
-8
lines changed- lib
- AST
- Basic
- test/DebugInfo
3 files changed
+39
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
448 | 470 | | |
449 | 471 | | |
450 | 472 | | |
| |||
453 | 475 | | |
454 | 476 | | |
455 | 477 | | |
| 478 | + | |
| 479 | + | |
456 | 480 | | |
457 | 481 | | |
458 | 482 | | |
| |||
552 | 576 | | |
553 | 577 | | |
554 | 578 | | |
555 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
556 | 582 | | |
557 | 583 | | |
558 | 584 | | |
| |||
1130 | 1156 | | |
1131 | 1157 | | |
1132 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1133 | 1163 | | |
1134 | 1164 | | |
1135 | 1165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | 133 | | |
140 | 134 | | |
141 | | - | |
142 | 135 | | |
143 | 136 | | |
144 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments