Commit e8de4c3
committed
Fix invalid DWARF for enums when using thinlto
We were setting the same identifier for both the DW_TAG_structure_type
and the DW_TAG_variant_part. This becomes a problem when using thinlto
becauses it uses the identifier as a key for a map of types that is used
to delete duplicates based on the ODR, so one of them is deleted as a
duplicate, resulting in invalid DWARF.
The DW_TAG_variant_part isn't a standalone type, so it doesn't need
an identifier. Fix by omitting its identifier.1 parent c82834e commit e8de4c3
File tree
4 files changed
+64
-11
lines changed- src
- librustc_codegen_llvm
- debuginfo
- llvm
- rustllvm
- test/debuginfo
4 files changed
+64
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
1215 | 1216 | | |
1216 | 1217 | | |
1217 | 1218 | | |
| 1219 | + | |
1218 | 1220 | | |
1219 | 1221 | | |
1220 | 1222 | | |
| |||
1256 | 1258 | | |
1257 | 1259 | | |
1258 | 1260 | | |
| 1261 | + | |
1259 | 1262 | | |
1260 | 1263 | | |
1261 | 1264 | | |
| |||
1298 | 1301 | | |
1299 | 1302 | | |
1300 | 1303 | | |
| 1304 | + | |
1301 | 1305 | | |
1302 | 1306 | | |
1303 | 1307 | | |
| |||
1358 | 1362 | | |
1359 | 1363 | | |
1360 | 1364 | | |
| 1365 | + | |
1361 | 1366 | | |
1362 | 1367 | | |
1363 | 1368 | | |
| |||
1698 | 1703 | | |
1699 | 1704 | | |
1700 | 1705 | | |
1701 | | - | |
1702 | | - | |
| 1706 | + | |
1703 | 1707 | | |
1704 | 1708 | | |
1705 | 1709 | | |
| |||
1770 | 1774 | | |
1771 | 1775 | | |
1772 | 1776 | | |
| 1777 | + | |
1773 | 1778 | | |
1774 | 1779 | | |
1775 | 1780 | | |
1776 | 1781 | | |
1777 | 1782 | | |
1778 | 1783 | | |
1779 | 1784 | | |
1780 | | - | |
| 1785 | + | |
| 1786 | + | |
1781 | 1787 | | |
1782 | 1788 | | |
1783 | 1789 | | |
| |||
1788 | 1794 | | |
1789 | 1795 | | |
1790 | 1796 | | |
1791 | | - | |
| 1797 | + | |
1792 | 1798 | | |
1793 | 1799 | | |
1794 | 1800 | | |
1795 | | - | |
| 1801 | + | |
1796 | 1802 | | |
1797 | 1803 | | |
1798 | 1804 | | |
| |||
1803 | 1809 | | |
1804 | 1810 | | |
1805 | 1811 | | |
1806 | | - | |
| 1812 | + | |
1807 | 1813 | | |
1808 | 1814 | | |
1809 | 1815 | | |
| |||
1824 | 1830 | | |
1825 | 1831 | | |
1826 | 1832 | | |
1827 | | - | |
| 1833 | + | |
1828 | 1834 | | |
1829 | 1835 | | |
1830 | 1836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1587 | 1587 | | |
1588 | 1588 | | |
1589 | 1589 | | |
1590 | | - | |
1591 | | - | |
| 1590 | + | |
1592 | 1591 | | |
1593 | 1592 | | |
1594 | 1593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
| 731 | + | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments