Commit fe9624f
committed
[clang][DebugInfo] Revert "emit variable definitions for constant-initialized static data-members"
This commit reverts the changes in llvm#71780
and all of its follow-up patches.
We got reports of the `.debug_names/.debug_gnu_pubnames/gdb_index/etc.`
sections growing by a non-trivial amount for some large projects. While
GCC does index definitions for static data member constants, they
do so *only* for explicitly `constexpr` members. We were indexing
*all* constant-initialized const-static members, which is likely where
the significant size difference comes from. However, only emitting explicitly
`constexpr` variables into the index doesn't seem like a good way
forward, since from clang's perspective `const`-static integrals
are `constexpr` too, and that shouldn't be any different in the debug-info
component. Also, as new code moves to `constexpr` instead of `const` static
for constants, such solution would just delay the growth of the Names index.
To prevent the size regression we revert to not emitting definitions for
static data-members that have no location.
To support access to such constants from LLDB we'll most likely have to
have to make LLDB find the constants by looking at the containing class
first.1 parent fcd06d7 commit fe9624f
File tree
7 files changed
+10
-280
lines changed- clang
- lib/CodeGen
- test/CodeGenCXX
- lldb/source/Plugins/SymbolFile/DWARF
7 files changed
+10
-280
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 72 | | |
96 | 73 | | |
97 | 74 | | |
| |||
1724 | 1701 | | |
1725 | 1702 | | |
1726 | 1703 | | |
1727 | | - | |
1728 | 1704 | | |
1729 | 1705 | | |
1730 | 1706 | | |
| |||
5628 | 5604 | | |
5629 | 5605 | | |
5630 | 5606 | | |
5631 | | - | |
5632 | | - | |
5633 | | - | |
5634 | | - | |
5635 | | - | |
5636 | | - | |
5637 | | - | |
5638 | | - | |
5639 | | - | |
5640 | | - | |
5641 | | - | |
5642 | | - | |
5643 | | - | |
5644 | | - | |
5645 | | - | |
5646 | | - | |
5647 | | - | |
5648 | | - | |
5649 | | - | |
5650 | | - | |
5651 | | - | |
5652 | | - | |
5653 | | - | |
5654 | | - | |
5655 | | - | |
5656 | | - | |
5657 | | - | |
5658 | | - | |
5659 | | - | |
5660 | | - | |
5661 | | - | |
5662 | | - | |
5663 | | - | |
5664 | | - | |
5665 | | - | |
5666 | 5607 | | |
5667 | 5608 | | |
5668 | 5609 | | |
| |||
5867 | 5808 | | |
5868 | 5809 | | |
5869 | 5810 | | |
5870 | | - | |
5871 | | - | |
5872 | | - | |
5873 | | - | |
5874 | | - | |
5875 | | - | |
5876 | | - | |
5877 | | - | |
5878 | | - | |
5879 | | - | |
5880 | | - | |
5881 | | - | |
5882 | | - | |
5883 | | - | |
5884 | 5811 | | |
5885 | 5812 | | |
5886 | 5813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | 164 | | |
168 | 165 | | |
169 | 166 | | |
| |||
529 | 526 | | |
530 | 527 | | |
531 | 528 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | 529 | | |
536 | 530 | | |
537 | 531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 120 | | |
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
| 124 | + | |
132 | 125 | | |
133 | 126 | | |
134 | 127 | | |
| |||
194 | 187 | | |
195 | 188 | | |
196 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
197 | 193 | | |
198 | 194 | | |
Lines changed: 0 additions & 104 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
Lines changed: 2 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 145 | | |
194 | 146 | | |
195 | 147 | | |
| |||
2916 | 2868 | | |
2917 | 2869 | | |
2918 | 2870 | | |
2919 | | - | |
| 2871 | + | |
2920 | 2872 | | |
2921 | 2873 | | |
2922 | | - | |
2923 | | - | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
2927 | | - | |
2928 | | - | |
2929 | | - | |
2930 | | - | |
2931 | | - | |
2932 | | - | |
2933 | | - | |
2934 | 2874 | | |
2935 | | - | |
| 2875 | + | |
2936 | 2876 | | |
2937 | 2877 | | |
2938 | 2878 | | |
| |||
Lines changed: 0 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | 416 | | |
428 | 417 | | |
429 | 418 | | |
| |||
0 commit comments