Skip to content

Commit 357d325

Browse files
committed
Revert "SILGen: Fix emission of default witness tables for mutable properties"
This reverts commit 1d49756.
1 parent 73e8193 commit 357d325

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

lib/SILGen/SILGenDecl.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,10 +1913,6 @@ class SILGenDefaultWitnessTable
19131913
ConcreteDeclRef witness = Proto->getDefaultWitness(d);
19141914
if (!witness) {
19151915
addMissingDefault();
1916-
if (d->isSettable(d->getDeclContext()))
1917-
addMissingDefault();
1918-
if (d->getMaterializeForSetFunc())
1919-
addMissingDefault();
19201916
return;
19211917
}
19221918

test/SILGen/protocol_resilience.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public protocol ResilientStorage {
9494
associatedtype T : ResilientConstructors
9595

9696
var propertyWithDefault: Int { get }
97-
var propertyWithNoDefault: Int { get }
9897
var mutablePropertyWithDefault: Int { get set }
9998
var mutablePropertyNoDefault: Int { get set }
10099
var mutableGenericPropertyWithDefault: T { get set }
@@ -250,16 +249,13 @@ protocol InternalProtocol {
250249
// CHECK-NEXT: }
251250

252251
// CHECK-LABEL: sil_default_witness_table ResilientStorage {
253-
// CHECK-NEXT: no_default
254-
// CHECK-NEXT: no_default
252+
// CHECK-NEXT: no_default
253+
// CHECK-NEXT: no_default
255254
// CHECK-NEXT: method #ResilientStorage.propertyWithDefault!getter.1: @_TFP19protocol_resilience16ResilientStorageg19propertyWithDefaultSi
256-
// CHECK-NEXT: no_default
257255
// CHECK-NEXT: method #ResilientStorage.mutablePropertyWithDefault!getter.1: @_TFP19protocol_resilience16ResilientStorageg26mutablePropertyWithDefaultSi
258256
// CHECK-NEXT: method #ResilientStorage.mutablePropertyWithDefault!setter.1: @_TFP19protocol_resilience16ResilientStorages26mutablePropertyWithDefaultSi
259257
// CHECK-NEXT: method #ResilientStorage.mutablePropertyWithDefault!materializeForSet.1: @_TFP19protocol_resilience16ResilientStoragem26mutablePropertyWithDefaultSi
260258
// CHECK-NEXT: no_default
261-
// CHECK-NEXT: no_default
262-
// CHECK-NEXT: no_default
263259
// CHECK-NEXT: method #ResilientStorage.mutableGenericPropertyWithDefault!getter.1: @_TFP19protocol_resilience16ResilientStorageg33mutableGenericPropertyWithDefaultwx1T
264260
// CHECK-NEXT: method #ResilientStorage.mutableGenericPropertyWithDefault!setter.1: @_TFP19protocol_resilience16ResilientStorages33mutableGenericPropertyWithDefaultwx1T
265261
// CHECK-NEXT: method #ResilientStorage.mutableGenericPropertyWithDefault!materializeForSet.1: @_TFP19protocol_resilience16ResilientStoragem33mutableGenericPropertyWithDefaultwx1T

0 commit comments

Comments
 (0)