File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ class LinkEntity {
575
575
static bool isValidResilientMethodRef (SILDeclRef declRef) {
576
576
if (declRef.isForeign )
577
577
return false ;
578
-
578
+
579
579
auto *decl = declRef.getDecl ();
580
580
return (isa<ClassDecl>(decl->getDeclContext ()) ||
581
581
isa<ProtocolDecl>(decl->getDeclContext ()));
Original file line number Diff line number Diff line change @@ -1609,8 +1609,9 @@ namespace {
1609
1609
}
1610
1610
1611
1611
void emitMethodDescriptor (SILDeclRef fn) {
1612
+
1612
1613
// Define the method descriptor to point to the current position in the
1613
- // nominal type descriptor.
1614
+ // nominal type descriptor, if it has a well-defined symbol name .
1614
1615
IGM.defineMethodDescriptor (fn, Type,
1615
1616
B.getAddrOfCurrentPosition (IGM.MethodDescriptorStructTy ));
1616
1617
@@ -1628,7 +1629,12 @@ namespace {
1628
1629
}
1629
1630
1630
1631
void emitNonoverriddenMethod (SILDeclRef fn) {
1631
- HasNonoverriddenMethods = true ;
1632
+ // TODO: Derivative functions do not distinguish themselves in the mangled
1633
+ // names of method descriptor symbols yet, causing symbol name collisions.
1634
+ if (fn.derivativeFunctionIdentifier )
1635
+ return ;
1636
+
1637
+ HasNonoverriddenMethods = true ;
1632
1638
// Although this method is non-overridden and therefore left out of the
1633
1639
// vtable, we still need to maintain the ABI of a potentially-overridden
1634
1640
// method for external clients.
You can’t perform that action at this time.
0 commit comments