File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -3539,6 +3539,8 @@ llvm::GlobalValue *IRGenModule::defineAssociatedConformanceDescriptor(
3539
3539
llvm::Constant *IRGenModule::getAddrOfProtocolConformanceDescriptor (
3540
3540
const RootProtocolConformance *conformance,
3541
3541
ConstantInit definition) {
3542
+ IRGen.addLazyWitnessTable (conformance);
3543
+
3542
3544
auto entity = LinkEntity::forProtocolConformanceDescriptor (conformance);
3543
3545
return getAddrOfLLVMVariable (entity, definition,
3544
3546
DebugTypeInfo ());
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -parse-as-library -O %s -emit-ir | %FileCheck %s
2
+
3
+ // CHECK: @"$s17lazy_conformances12MyCollectionVyxGSKAASKRzrlMc" = hidden constant {
4
+ // CHECK: @"$s17lazy_conformances12MyCollectionVyxGSTAAMc" = hidden constant {
5
+
6
+ struct MyCollection < Base : Collection > : Collection {
7
+ typealias Index = Base . Index
8
+ typealias Element = Base . Element
9
+
10
+ var startIndex : Index {
11
+ fatalError ( )
12
+ }
13
+
14
+ var endIndex : Index {
15
+ fatalError ( )
16
+ }
17
+
18
+ func index( after i: Index ) -> Index {
19
+ fatalError ( )
20
+ }
21
+
22
+ func formIndex( after i: inout Index ) {
23
+ fatalError ( )
24
+ }
25
+
26
+ subscript( position: Index ) -> Element {
27
+ fatalError ( )
28
+ }
29
+ }
30
+
31
+ extension MyCollection : BidirectionalCollection
32
+ where Base : BidirectionalCollection
33
+ {
34
+ func index( before i: Index ) -> Index {
35
+ fatalError ( )
36
+ }
37
+
38
+ func formIndex( before i: inout Index ) {
39
+ fatalError ( )
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments