File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -1264,6 +1264,11 @@ bool LinkEntity::isFragile(IRGenModule &IGM) const {
1264
1264
1265
1265
case Kind::ReflectionAssociatedTypeDescriptor:
1266
1266
case Kind::ReflectionSuperclassDescriptor:
1267
+ case Kind::AssociatedTypeMetadataAccessFunction:
1268
+ case Kind::AssociatedTypeWitnessTableAccessFunction:
1269
+ case Kind::GenericProtocolWitnessTableCache:
1270
+ case Kind::GenericProtocolWitnessTableInstantiationFunction:
1271
+ case Kind::ObjCClassRef:
1267
1272
return false ;
1268
1273
1269
1274
default :
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend %s -module-name=test -emit-ir | %FileCheck %s
2
+
3
+ sil_stage canonical
4
+
5
+ import Builtin
6
+ import Swift
7
+ import SwiftShims
8
+
9
+ protocol P {
10
+ }
11
+
12
+ struct PBox<T> where T : P {
13
+ init()
14
+ }
15
+
16
+ protocol HasSimpleAssoc {
17
+ associatedtype Assoc
18
+ }
19
+
20
+ protocol DerivedFromSimpleAssoc : HasSimpleAssoc {
21
+ }
22
+
23
+ struct GenericComputed<T> : DerivedFromSimpleAssoc where T : P {
24
+ typealias Assoc = PBox<T>
25
+ init()
26
+ }
27
+
28
+ sil_witness_table shared [fragile] <T where T : P> GenericComputed<T>: DerivedFromSimpleAssoc module nix {
29
+ base_protocol HasSimpleAssoc: <T where T : P> GenericComputed<T>: HasSimpleAssoc module nix
30
+ }
31
+
32
+ sil_witness_table shared [fragile] <T where T : P> GenericComputed<T>: HasSimpleAssoc module nix {
33
+ associated_type Assoc: PBox<T>
34
+ }
35
+
36
+ sil_default_witness_table hidden P {
37
+ }
38
+
39
+ sil_default_witness_table hidden HasSimpleAssoc {
40
+ no_default
41
+ }
42
+
43
+ sil_default_witness_table hidden DerivedFromSimpleAssoc {
44
+ no_default
45
+ }
46
+
47
+ // CHECK: @_T04test15GenericComputedVyxGAA22DerivedFromSimpleAssocA2A1PRzlWG = internal global
48
+ // CHECK: define internal void @_T04test15GenericComputedVyxGAA22DerivedFromSimpleAssocA2A1PRzlWI
49
+
50
+
You can’t perform that action at this time.
0 commit comments