don't drop underscored protocol implementation symbols (#75848)

rdar://133086270
This commit is contained in:
QuietMisdreavus
2024-08-15 15:41:17 -06:00
committed by GitHub
parent a721ef63f6
commit bafe819e8d
2 changed files with 27 additions and 7 deletions

View File

@@ -25,15 +25,21 @@
// Same for ExtraStruct.Inner
// CHECK-DAG: s:27SkipProtocolImplementations11ExtraStructV5InnerV
// HiddenStruct.T should be present because its source protocol is underscored
// CHECK-DAG: "precise": "s:27SkipProtocolImplementations12HiddenStructV1TV",
// CHECK-LABEL: "relationships": [
// we want to make sure that the conformance relationship itself stays
// CHECK-DAG: conformsTo
// SomeStruct.otherFunc() and ExtraStruct.Inner should be the only ones with sourceOrigin information
// There should only be three symbols with sourceOrigin information:
// - SomeStruct.otherFunc()
// - ExtraStruct.Inner
// - HiddenStruct.T
// (ExtraStruct.Inner will have two sourceOrigins because it has two relationships: a memberOf and a
// conformsTo)
// COUNT-COUNT-3: sourceOrigin
// COUNT-COUNT-4: sourceOrigin
// COUNT-NOT: sourceOrigin
public protocol SomeProtocol {
@@ -73,3 +79,11 @@ public struct ExtraStruct: OtherProtocol {
}
extension ExtraStruct.Inner: Sendable {}
public protocol _HiddenProtocol {
associatedtype T
}
public struct HiddenStruct: _HiddenProtocol {
public struct T {}
}