Commit 824bd75
committed
IRGen: Emit typerefs for all builtin types referenced from reflection metadata sections
In order to perform layout, the remote mirrors library needs to know
about the size, alignment and extra inhabitants of builtin types.
Ideally we would emit a reflection info section in libswiftRuntime.o,
but in the meantime just duplicate builtin type metadata for all
builtin types referenced from the current module instead.
In practice only the stdlib and a handful of overlays like the SIMD
overlay use builtin types, and only a few at a time.
Tested manually by running swift-reflection-tool on the standard
library -- I'll add automated tests by using -parse-stdlib to
reference Builtin types in a subsequent patch that adds more layout
logic.
NFC if -enable-reflection-metadata is off.1 parent f236383 commit 824bd75
File tree
13 files changed
+347
-182
lines changed- include/swift
- Reflection
- SwiftRemoteMirror
- lib/IRGen
- stdlib/public/SwiftRemoteMirror
- test/Reflection
- tools
- swift-reflection-dump
- swift-reflection-test
13 files changed
+347
-182
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| 102 | + | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
130 | 165 | | |
131 | 166 | | |
132 | 167 | | |
| |||
179 | 214 | | |
180 | 215 | | |
181 | 216 | | |
| 217 | + | |
| 218 | + | |
182 | 219 | | |
183 | 220 | | |
184 | 221 | | |
| |||
243 | 280 | | |
244 | 281 | | |
245 | 282 | | |
246 | | - | |
247 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
248 | 301 | | |
249 | 302 | | |
250 | 303 | | |
251 | | - | |
| 304 | + | |
252 | 305 | | |
253 | 306 | | |
254 | | - | |
255 | | - | |
| 307 | + | |
| 308 | + | |
256 | 309 | | |
257 | 310 | | |
258 | | - | |
259 | | - | |
| 311 | + | |
260 | 312 | | |
261 | | - | |
| 313 | + | |
262 | 314 | | |
263 | 315 | | |
264 | 316 | | |
265 | 317 | | |
266 | | - | |
| 318 | + | |
267 | 319 | | |
268 | 320 | | |
269 | 321 | | |
270 | | - | |
| 322 | + | |
271 | 323 | | |
272 | 324 | | |
273 | 325 | | |
274 | 326 | | |
275 | | - | |
276 | 327 | | |
277 | 328 | | |
278 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | | - | |
| 187 | + | |
187 | 188 | | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
298 | 315 | | |
299 | 316 | | |
300 | | - | |
301 | | - | |
| 317 | + | |
302 | 318 | | |
303 | | - | |
304 | | - | |
305 | 319 | | |
| 320 | + | |
| 321 | + | |
306 | 322 | | |
307 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
308 | 328 | | |
309 | 329 | | |
310 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | | - | |
56 | | - | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | | - | |
| 882 | + | |
883 | 883 | | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
| 884 | + | |
891 | 885 | | |
892 | 886 | | |
893 | 887 | | |
| |||
0 commit comments