Skip to content

Commit 284c4f8

Browse files
committed
IRGen: Fix Linux build -- non-external functions have protected linkage
1 parent 60f437a commit 284c4f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/IRGen/protocol_resilience.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protocol InternalProtocol {
4141
}
4242

4343

44-
// CHECK-LABEL: define void @defaultC(%swift.opaque* noalias nocapture, %swift.type* %Self, i8** %SelfWitnessTable)
44+
// CHECK-LABEL: define{{( protected)?}} void @defaultC(%swift.opaque* noalias nocapture, %swift.type* %Self, i8** %SelfWitnessTable)
4545
// CHECK-NEXT: entry:
4646

4747
sil @defaultC : $@convention(witness_method) <Self where Self : ResilientProtocol> (@in_guaranteed Self) -> () {
@@ -52,7 +52,7 @@ bb0(%0 : $*Self):
5252
}
5353

5454

55-
// CHECK-LABEL: define void @defaultD(%swift.opaque* noalias nocapture, %swift.type* %Self, i8** %SelfWitnessTable)
55+
// CHECK-LABEL: define{{( protected)?}} void @defaultD(%swift.opaque* noalias nocapture, %swift.type* %Self, i8** %SelfWitnessTable)
5656
// CHECK-NEXT: entry:
5757

5858
sil @defaultD : $@convention(witness_method) <Self where Self : ResilientProtocol> (@in_guaranteed Self) -> () {

test/IRGen/witness_method.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct SyncUp<Deliverable> : Synergy {
6060
}
6161
}
6262

63-
// CHECK-LABEL: define void @testGenericWitnessMethod(%swift.opaque* noalias nocapture sret, %V14witness_method6SyncUp* noalias nocapture, %swift.type* %T)
63+
// CHECK-LABEL: define{{( protected)?}} void @testGenericWitnessMethod(%swift.opaque* noalias nocapture sret, %V14witness_method6SyncUp* noalias nocapture, %swift.type* %T)
6464
// CHECK: entry:
6565
// CHECK: [[METADATA:%.*]] = call %swift.type* @_TMaV14witness_method6SyncUp(%swift.type* %T)
6666
// CHECK: [[WTABLE:%.*]] = call i8** @_TWaurGV14witness_method6SyncUpx_S_7SynergyS_(%swift.type* [[METADATA]])
@@ -86,7 +86,7 @@ protocol Strategy {
8686
func disrupt() -> GrowthHack
8787
}
8888

89-
// CHECK-LABEL: define void @testArchetypeWitnessMethod(%swift.opaque* noalias nocapture sret, %swift.opaque* noalias nocapture, %swift.type* %T, i8** %T.Strategy, %swift.type* %T.GrowthHack, i8** %T.GrowthHack.Pivot)
89+
// CHECK-LABEL: define{{( protected)?}} void @testArchetypeWitnessMethod(%swift.opaque* noalias nocapture sret, %swift.opaque* noalias nocapture, %swift.type* %T, i8** %T.Strategy, %swift.type* %T.GrowthHack, i8** %T.GrowthHack.Pivot)
9090
// CHECK: entry:
9191
// CHECK: [[WITNESS_ADDR:%.*]] = getelementptr inbounds i8*, i8** %T.Strategy, i32 2
9292
// CHECK: [[WITNESS_FN:%.*]] = load i8*, i8** [[WITNESS_ADDR]]

0 commit comments

Comments
 (0)