File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1492,7 +1492,7 @@ namespace {
1492
1492
void addMethod (SILDeclRef fn) {
1493
1493
if (!VTable || methodRequiresReifiedVTableEntry (IGM, VTable, fn)) {
1494
1494
VTableEntries.push_back (fn);
1495
- } else if ( hasPublicVisibility (fn. getLinkage (NotForDefinition))) {
1495
+ } else {
1496
1496
// Emit a stub method descriptor and lookup function for nonoverridden
1497
1497
// methods so that resilient code sequences can still use them.
1498
1498
emitNonoverriddenMethod (fn);
@@ -1634,7 +1634,10 @@ namespace {
1634
1634
// method for external clients.
1635
1635
1636
1636
// Emit method dispatch thunk.
1637
- IGM.emitDispatchThunk (fn);
1637
+ if (hasPublicVisibility (fn.getLinkage (NotForDefinition))) {
1638
+ IGM.emitDispatchThunk (fn);
1639
+ }
1640
+
1638
1641
// Emit a freestanding method descriptor structure. This doesn't have to
1639
1642
// exist in the table in the class's context descriptor since it isn't
1640
1643
// in the vtable, but external clients need to be able to link against the
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ sil_vtable InternalA {
24
24
#InternalA.bas : @InternalA_bas [nonoverridden]
25
25
}
26
26
27
+ // -- we should still generate method descriptors for the elided methods
28
+ // CHECK-LABEL: @"$s21vtable_non_overridden9InternalAC3fooyyFTq" =
29
+ // CHECK-LABEL: @"$s21vtable_non_overridden9InternalAC3basyyFTq" =
30
+
27
31
// -- only overridden entries in internal method descriptor table
28
32
// CHECK-LABEL: @"$s21vtable_non_overridden9InternalACMn" =
29
33
// CHECK-SAME: i32 2, %swift.method_descriptor
You can’t perform that action at this time.
0 commit comments