Commit 09449de
committed
[IRGen] Fix RecordTypeInfoImpl::initWithTake.
Apply the same control-flow changes to the method that were applied on
main to avoid duplicated implementations one of which crashes with
```
Metadata for archetype not bound in function.
The metadata could be missing entirely because it needs to be passed to the function.
Or the metadata is present and not bound in which case setScopedLocalTypeMetadata or similar must be called.
Archetype without metadata: Value
(primary_archetype_type address=0x14207ebe0 conforms_to="Swift.(file).Escapable" name="Value"
(interface_type=generic_type_param_type depth=0 index=0 decl="Synchronization.(file)._Cell.Value@/path/to/swift/6_0_0_6/swift/stdlib/public/Synchronization/Cell.swift:19:23"))
Function:
; Function Attrs: noinline nounwind
define linkonce_odr hidden ptr @"$s15Synchronization5_CellVyxGRi_zlWOb"(ptr %0, ptr %1, ptr %2) swiftlang#14 !dbg !8 {
%4 = alloca i1, align 1
}
LocalTypeData:
(0x14207f5f8 (_Cell<Value>), FormalTypeMetadata) => [
(universal) concrete: 0x600003d1add0
ptr %2
]
```
when building Synchronization.1 parent 54898ce commit 09449de
File tree
2 files changed
+58
-11
lines changed- lib/IRGen
- test/IRGen
2 files changed
+58
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 271 | + | |
| 272 | + | |
276 | 273 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 274 | + | |
280 | 275 | | |
281 | 276 | | |
282 | 277 | | |
| |||
292 | 287 | | |
293 | 288 | | |
294 | 289 | | |
295 | | - | |
296 | | - | |
297 | | - | |
| 290 | + | |
298 | 291 | | |
299 | 292 | | |
300 | 293 | | |
| |||
| 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 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments