Skip to content

Commit 4662674

Browse files
authored
Merge pull request #6400 from eeckstein/silgen-fix
SILGen: Don’t make class accessors transparent.
2 parents 05d41ae + 74d979f commit 4662674

24 files changed

+113
-90
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static void maybeMarkTransparent(FuncDecl *accessor,
262262
AbstractStorageDecl *storage,
263263
TypeChecker &TC) {
264264
auto *DC = storage->getDeclContext();
265-
if (isa<ProtocolDecl>(DC))
265+
if (isa<ProtocolDecl>(DC) || isa<ClassDecl>(DC))
266266
return;
267267

268268
auto *nominal = DC->getAsNominalTypeOrNominalTypeExtensionContext();

test/SILGen/accessibility_warnings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ internal class InternalClass {
123123
// CHECK-DAG: sil hidden{{( \[.+\])*}} @_TFC22accessibility_warnings13InternalClassg9publicVarSi
124124
public var publicVar = 0
125125

126-
// CHECK-DAG: sil hidden [transparent] @_TFC22accessibility_warnings13InternalClassg19publicVarPrivateSetSi
126+
// CHECK-DAG: sil hidden @_TFC22accessibility_warnings13InternalClassg19publicVarPrivateSetSi
127127
public private(set) var publicVarPrivateSet = 0
128128

129129
public public(set) var publicVarPublicSet = 0

test/SILGen/addressors.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class G {
306306
}
307307
}
308308
}
309-
// CHECK: sil hidden [transparent] @_TFC10addressors1Gg5valueVs5Int32 : $@convention(method) (@guaranteed G) -> Int32 {
309+
// CHECK: sil hidden @_TFC10addressors1Gg5valueVs5Int32 : $@convention(method) (@guaranteed G) -> Int32 {
310310
// CHECK: bb0([[SELF:%0]] : $G):
311311
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_TFC10addressors1Glo5valueVs5Int32 : $@convention(method) (@guaranteed G) -> (UnsafePointer<Int32>, @owned Builtin.NativeObject)
312312
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
@@ -319,7 +319,7 @@ class G {
319319
// CHECK: strong_release [[OWNER]] : $Builtin.NativeObject
320320
// CHECK: return [[VALUE]] : $Int32
321321

322-
// CHECK: sil hidden [transparent] @_TFC10addressors1Gs5valueVs5Int32 : $@convention(method) (Int32, @guaranteed G) -> () {
322+
// CHECK: sil hidden @_TFC10addressors1Gs5valueVs5Int32 : $@convention(method) (Int32, @guaranteed G) -> () {
323323
// CHECK: bb0([[VALUE:%0]] : $Int32, [[SELF:%1]] : $G):
324324
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_TFC10addressors1Gao5valueVs5Int32 : $@convention(method) (@guaranteed G) -> (UnsafeMutablePointer<Int32>, @owned Builtin.NativeObject)
325325
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
@@ -332,7 +332,7 @@ class G {
332332
// CHECK: strong_release [[OWNER]] : $Builtin.NativeObject
333333

334334
// materializeForSet for G.value
335-
// CHECK-LABEL: sil hidden [transparent] @_TFC10addressors1Gm5valueVs5Int32 : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed G) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
335+
// CHECK-LABEL: sil hidden @_TFC10addressors1Gm5valueVs5Int32 : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed G) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
336336
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $G):
337337
// Call the addressor.
338338
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_TFC10addressors1Gao5valueVs5Int32 : $@convention(method) (@guaranteed G) -> (UnsafeMutablePointer<Int32>, @owned Builtin.NativeObject)
@@ -356,7 +356,7 @@ class G {
356356
// CHECK: return [[RESULT]]
357357

358358
// materializeForSet callback for G.value
359-
// CHECK-LABEL: sil hidden [transparent] @_TFFC10addressors1Gm5valueVs5Int32U_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout G, @thick G.Type) -> () {
359+
// CHECK-LABEL: sil hidden @_TFFC10addressors1Gm5valueVs5Int32U_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout G, @thick G.Type) -> () {
360360
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $*G, [[SELFTYPE:%3]] : $@thick G.Type):
361361
// CHECK: [[T0:%.*]] = project_value_buffer $Builtin.NativeObject in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
362362
// CHECK: [[OWNER:%.*]] = load [[T0]]
@@ -426,7 +426,7 @@ class I {
426426
}
427427
}
428428
}
429-
// CHECK-LABEL: sil hidden [transparent] @_TFC10addressors1Ig5valueVs5Int32 : $@convention(method) (@guaranteed I) -> Int32 {
429+
// CHECK-LABEL: sil hidden @_TFC10addressors1Ig5valueVs5Int32 : $@convention(method) (@guaranteed I) -> Int32 {
430430
// CHECK: bb0([[SELF:%0]] : $I):
431431
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_TFC10addressors1Ilp5valueVs5Int32 : $@convention(method) (@guaranteed I) -> (UnsafePointer<Int32>, @owned Optional<Builtin.NativeObject>)
432432
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
@@ -439,7 +439,7 @@ class I {
439439
// CHECK: strong_unpin [[OWNER]] : $Optional<Builtin.NativeObject>
440440
// CHECK: return [[VALUE]] : $Int32
441441

442-
// CHECK-LABEL: sil hidden [transparent] @_TFC10addressors1Is5valueVs5Int32 : $@convention(method) (Int32, @guaranteed I) -> () {
442+
// CHECK-LABEL: sil hidden @_TFC10addressors1Is5valueVs5Int32 : $@convention(method) (Int32, @guaranteed I) -> () {
443443
// CHECK: bb0([[VALUE:%0]] : $Int32, [[SELF:%1]] : $I):
444444
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_TFC10addressors1Iap5valueVs5Int32 : $@convention(method) (@guaranteed I) -> (UnsafeMutablePointer<Int32>, @owned Optional<Builtin.NativeObject>)
445445
// CHECK: [[T0:%.*]] = apply [[ADDRESSOR]]([[SELF]])
@@ -451,7 +451,7 @@ class I {
451451
// CHECK: store [[VALUE]] to [[T2]] : $*Int32
452452
// CHECK: strong_unpin [[OWNER]] : $Optional<Builtin.NativeObject>
453453

454-
// CHECK-LABEL: sil hidden [transparent] @_TFC10addressors1Im5valueVs5Int32 : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed I) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
454+
// CHECK-LABEL: sil hidden @_TFC10addressors1Im5valueVs5Int32 : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed I) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
455455
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $I):
456456
// Call the addressor.
457457
// CHECK: [[ADDRESSOR:%.*]] = function_ref @_TFC10addressors1Iap5valueVs5Int32 : $@convention(method) (@guaranteed I) -> (UnsafeMutablePointer<Int32>, @owned Optional<Builtin.NativeObject>)
@@ -475,7 +475,7 @@ class I {
475475
// CHECK: return [[RESULT]]
476476

477477
// materializeForSet callback for I.value
478-
// CHECK-LABEL: sil hidden [transparent] @_TFFC10addressors1Im5valueVs5Int32U_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout I, @thick I.Type) -> () {
478+
// CHECK-LABEL: sil hidden @_TFFC10addressors1Im5valueVs5Int32U_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout I, @thick I.Type) -> () {
479479
// CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $*I, [[SELFTYPE:%3]] : $@thick I.Type):
480480
// CHECK: [[T0:%.*]] = project_value_buffer $Optional<Builtin.NativeObject> in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
481481
// CHECK: [[OWNER:%.*]] = load [[T0]]

test/SILGen/c_materializeForSet_linkage.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ extension NSReferencePoint: Pointable {}
1919
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFVSC7NSPointm1xSf
2020
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFVSC7NSPointm1ySf
2121

22-
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFCSo16NSReferencePointm1xSf
23-
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFCSo16NSReferencePointm1ySf
22+
// CHECK-LABEL: sil shared @_TFCSo16NSReferencePointm1xSf
23+
// CHECK-LABEL: sil shared @_TFCSo16NSReferencePointm1ySf
2424

25-
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFFCSo16NSReferencePointm1xSfU_T_
26-
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFFCSo16NSReferencePointm1ySfU_T_
25+
// CHECK-LABEL: sil shared @_TFFCSo16NSReferencePointm1xSfU_T_
26+
// CHECK-LABEL: sil shared @_TFFCSo16NSReferencePointm1ySfU_T_

test/SILGen/dynamic.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ protocol Proto {
6868

6969
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Fooc
7070
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foo10objcMethod
71-
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foog8objcPropSi
72-
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foos8objcPropSi
71+
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foog8objcPropSi
72+
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foos8objcPropSi
7373
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foog9subscriptFT4objcPs9AnyObject__Si
7474
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foos9subscriptFT4objcPs9AnyObject__Si
7575

@@ -81,8 +81,8 @@ protocol Proto {
8181

8282
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Fooc
8383
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foo13dynamicMethod
84-
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foog11dynamicPropSi
85-
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foos11dynamicPropSi
84+
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foog11dynamicPropSi
85+
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foos11dynamicPropSi
8686
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foog9subscriptFT7dynamicSi_Si
8787
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foos9subscriptFT7dynamicSi_Si
8888

test/SILGen/guaranteed_self.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,15 @@ class C: Fooable, Barrable {
320320
self.bas()
321321
}
322322

323-
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC15guaranteed_self1Cg5prop1Si : $@convention(objc_method) (C) -> Int
323+
// CHECK-LABEL: sil hidden [thunk] @_TToFC15guaranteed_self1Cg5prop1Si : $@convention(objc_method) (C) -> Int
324324
// CHECK: bb0([[SELF:%.*]] : $C):
325325
// CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]
326326
// CHECK: apply {{.*}}([[SELF_COPY]])
327327
// CHECK: destroy_value [[SELF_COPY]]
328328
// CHECK-NOT: destroy_value [[SELF]]
329329
// CHECK-NOT: destroy_value [[SELF_COPY]]
330330

331-
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC15guaranteed_self1Cs5prop1Si : $@convention(objc_method) (Int, C) -> ()
331+
// CHECK-LABEL: sil hidden [thunk] @_TToFC15guaranteed_self1Cs5prop1Si : $@convention(objc_method) (Int, C) -> ()
332332
// CHECK: bb0({{.*}} [[SELF:%.*]] : $C):
333333
// CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]
334334
// CHECK: apply {{.*}} [[SELF_COPY]]

test/SILGen/materializeForSet.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Base {
66
// The ordering here is unfortunate: we generate the property
77
// getters and setters after we've processed the decl.
88

9-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet4Basem8computedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed Base) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
9+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet4Basem8computedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed Base) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
1010
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $Base):
1111
// CHECK: [[ADDR:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
1212
// CHECK: [[T0:%.*]] = function_ref @_TFC17materializeForSet4Baseg8computedSi
@@ -20,15 +20,15 @@ class Base {
2020
// CHECK: return [[T4]] : $(Builtin.RawPointer, Optional<Builtin.RawPointer>)
2121
// CHECK: }
2222

23-
// CHECK-LABEL: sil hidden [transparent] @_TFFC17materializeForSet4Basem8computedSiU_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Base, @thick Base.Type) -> () {
23+
// CHECK-LABEL: sil hidden @_TFFC17materializeForSet4Basem8computedSiU_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Base, @thick Base.Type) -> () {
2424
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $*Base, [[SELFTYPE:%.*]] : $@thick Base.Type):
2525
// CHECK: [[T0:%.*]] = load_borrow [[SELF]]
2626
// CHECK: [[T1:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
2727
// CHECK: [[T2:%.*]] = load [trivial] [[T1]] : $*Int
2828
// CHECK: [[SETTER:%.*]] = function_ref @_TFC17materializeForSet4Bases8computedSi
2929
// CHECK: apply [[SETTER]]([[T2]], [[T0]])
3030

31-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet4Basem6storedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed Base) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
31+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet4Basem6storedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed Base) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
3232
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $Base):
3333
// CHECK: [[T0:%.*]] = ref_element_addr [[SELF]] : $Base, #Base.stored
3434
// CHECK: [[T1:%.*]] = address_to_pointer [[T0]] : $*Int to $Builtin.RawPointer
@@ -205,7 +205,7 @@ class HasDidSet : Base {
205205
didSet {}
206206
}
207207

208-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet9HasDidSetm6storedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasDidSet) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
208+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet9HasDidSetm6storedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasDidSet) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
209209
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $HasDidSet):
210210
// CHECK: [[T2:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
211211
// CHECK: [[T0:%.*]] = function_ref @_TFC17materializeForSet9HasDidSetg6storedSi
@@ -224,7 +224,7 @@ class HasDidSet : Base {
224224
set(value) {}
225225
}
226226

227-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet9HasDidSetm8computedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasDidSet) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
227+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet9HasDidSetm8computedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasDidSet) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
228228
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $HasDidSet):
229229
// CHECK: [[T2:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
230230
// CHECK: [[T0:%.*]] = function_ref @_TFC17materializeForSet9HasDidSetg8computedSi
@@ -244,7 +244,7 @@ class HasStoredDidSet {
244244
didSet {}
245245
}
246246

247-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet15HasStoredDidSetm6storedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasStoredDidSet) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
247+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet15HasStoredDidSetm6storedSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasStoredDidSet) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
248248
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $HasStoredDidSet):
249249
// CHECK: [[T2:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
250250
// CHECK: [[T0:%.*]] = function_ref @_TFC17materializeForSet15HasStoredDidSetg6storedSi
@@ -259,7 +259,7 @@ class HasStoredDidSet {
259259
// CHECK: }
260260
}
261261

262-
// CHECK-LABEL: sil hidden [transparent] @_TFFC17materializeForSet15HasStoredDidSetm6storedSiU_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout HasStoredDidSet, @thick HasStoredDidSet.Type) -> () {
262+
// CHECK-LABEL: sil hidden @_TFFC17materializeForSet15HasStoredDidSetm6storedSiU_T_ : $@convention(thin) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout HasStoredDidSet, @thick HasStoredDidSet.Type) -> () {
263263
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $*HasStoredDidSet, [[METATYPE:%.*]] : $@thick HasStoredDidSet.Type):
264264
// CHECK: [[SELF_VALUE:%.*]] = load_borrow [[SELF]] : $*HasStoredDidSet
265265
// CHECK: [[BUFFER_ADDR:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
@@ -272,7 +272,7 @@ class HasStoredDidSet {
272272
class HasWeak {
273273
weak var weakvar: HasWeak?
274274
}
275-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet7HasWeakm7weakvarXwGSqS0__ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasWeak) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
275+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet7HasWeakm7weakvarXwGSqS0__ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasWeak) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
276276
// CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $HasWeak):
277277
// CHECK: [[T2:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Optional<HasWeak>
278278
// CHECK: [[T0:%.*]] = ref_element_addr [[SELF]] : $HasWeak, #HasWeak.weakvar
@@ -471,7 +471,7 @@ func inoutAccessOfLazyStructProperty(l: inout LazyStructProperty) {
471471

472472
// Test for materializeForSet vs lazy properties of classes.
473473

474-
// CHECK-LABEL: sil hidden [transparent] @_TFC17materializeForSet17LazyClassPropertym3catSi
474+
// CHECK-LABEL: sil hidden @_TFC17materializeForSet17LazyClassPropertym3catSi
475475

476476
class LazyClassProperty {
477477
lazy var cat: Int = 5

test/SILGen/multi_file.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ class HasComputedProperty: ProtocolWithProperty {
4646
set {}
4747
}
4848
}
49-
// CHECK-LABEL: sil hidden [transparent] @_TFC10multi_file19HasComputedPropertym3fooSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasComputedProperty) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
49+
// CHECK-LABEL: sil hidden @_TFC10multi_file19HasComputedPropertym3fooSi : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed HasComputedProperty) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {
5050
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TTWC10multi_file19HasComputedPropertyS_20ProtocolWithPropertyS_FS1_m3fooSi : $@convention(witness_method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout HasComputedProperty) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>) {

test/SILGen/nsmanaged-witness.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ extension Foo: NativeIntProperty {}
6161
// TODO: We can't emit a vtable entry for materializeForSet for ObjC types.
6262
// CHECK-NOT: class_method {{.*}}Foo{{.*}}intProperty{{.*}}materializeForSet
6363

64-
// CHECK-LABEL: sil shared [transparent] [fragile] @_TFCSo3Foom11intPropertyVs5Int32
64+
// CHECK-LABEL: sil shared @_TFCSo3Foom11intPropertyVs5Int32
6565

0 commit comments

Comments
 (0)