Skip to content

Commit cb07d39

Browse files
committed
TBDGen: Pass useResolver=true to forEachValueWitness()
1 parent ca189d1 commit cb07d39

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

lib/SIL/IR/SILSymbolVisitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class SILSymbolVisitorImpl : public ASTVisitor<SILSymbolVisitorImpl> {
306306
addSymbolIfNecessary(getter, witnessDecl);
307307
}
308308
}
309-
});
309+
}, /*useResolver=*/true);
310310
}
311311
}
312312

test/TBD/resolve_imports.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// REQUIRES: OS=macosx
66

7+
// Correct linkage for opaque type descriptor.
78
@_alwaysEmitIntoClient public var x: some Any {
89
get {
910
if #available(macOS 20, *) {
@@ -14,8 +15,20 @@
1415
}
1516
}
1617

18+
// Make sure we emit all ABI members.
1719
public class C {}
1820

21+
// Edge case where protocol witness thunk is public.
22+
protocol PrivateProto: Equatable {}
23+
24+
extension PrivateProto {
25+
public static func ==(lhs: Self, rhs: Self) -> Bool { return false }
26+
}
27+
28+
public struct S: PrivateProto {}
29+
1930
// CHECK: symbols: [ '_$s15resolve_imports1CCMa', '_$s15resolve_imports1CCMm',
2031
// CHECK-NEXT: '_$s15resolve_imports1CCMn', '_$s15resolve_imports1CCN', '_$s15resolve_imports1CCfD',
21-
// CHECK-NEXT: '_$s15resolve_imports1CCfd', _main ]
32+
// CHECK-NEXT: '_$s15resolve_imports1CCfd', '_$s15resolve_imports1SVMa',
33+
// CHECK-NEXT: '_$s15resolve_imports1SVMn', '_$s15resolve_imports1SVN', '_$s15resolve_imports1SVSQAAMc',
34+
// CHECK-NEXT: '_$s15resolve_imports1SVSQAASQ2eeoiySbx_xtFZTW', _main ]

0 commit comments

Comments
 (0)