1
1
/*
2
2
This source file is part of the Swift.org open source project
3
3
4
- Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
4
+ Copyright (c) 2021-2025 Apple Inc. and the Swift project authors
5
5
Licensed under Apache License v2.0 with Runtime Library Exception
6
6
7
7
See https://swift.org/LICENSE.txt for license information
@@ -27,8 +27,6 @@ enum GeneratedDocumentationTopics {
27
27
struct APICollection {
28
28
/// The title of the collection.
29
29
var title : String
30
- /// A reference to the parent of the collection.
31
- let parentReference : ResolvedTopicReference
32
30
/// A list of topic references for the collection.
33
31
var identifiers = [ ResolvedTopicReference] ( )
34
32
}
@@ -39,8 +37,7 @@ enum GeneratedDocumentationTopics {
39
37
/// - childReference: The inherited symbol reference.
40
38
/// - reference: The parent type reference.
41
39
/// - originDisplayName: The origin display name as provided by the symbol graph.
42
- /// - extendedModuleName: Extended module name.
43
- mutating func add( _ childReference: ResolvedTopicReference , to reference: ResolvedTopicReference , childSymbol: SymbolGraph . Symbol , originDisplayName: String , originSymbol: SymbolGraph . Symbol ? , extendedModuleName: String ) throws {
40
+ mutating func add( _ childReference: ResolvedTopicReference , to reference: ResolvedTopicReference , childSymbol: SymbolGraph . Symbol , originDisplayName: String , originSymbol: SymbolGraph . Symbol ? ) throws {
44
41
let fromType : String
45
42
let typeSimpleName : String
46
43
if let originSymbol, originSymbol. pathComponents. count > 1 {
@@ -89,7 +86,7 @@ enum GeneratedDocumentationTopics {
89
86
90
87
// Create a new default implementations provider, if needed.
91
88
if !implementingTypes[ reference] !. inheritedFromTypeName. keys. contains ( fromType) {
92
- implementingTypes [ reference] !. inheritedFromTypeName [ fromType] = Collections . APICollection ( title: " \( typeSimpleName) Implementations " , parentReference : reference )
89
+ implementingTypes [ reference] !. inheritedFromTypeName [ fromType] = Collections . APICollection ( title: " \( typeSimpleName) Implementations " )
93
90
}
94
91
95
92
// Add the default implementation.
@@ -247,13 +244,13 @@ enum GeneratedDocumentationTopics {
247
244
let child = context. documentationCache [ relationship. source] ,
248
245
// Get the child symbol
249
246
let childSymbol = child. symbol,
250
- // Get the swift extension data
251
- let extends = childSymbol [ mixin: SymbolGraph . Symbol. Swift. Extension. self]
247
+ // Check that there is Swift extension information
248
+ childSymbol [ mixin: SymbolGraph . Symbol. Swift. Extension. self] != nil
252
249
{
253
250
let originSymbol = context. documentationCache [ origin. identifier] ? . symbol
254
251
255
252
// Add the inherited symbol to the index.
256
- try inheritanceIndex. add ( child. reference, to: parent. reference, childSymbol: childSymbol, originDisplayName: origin. displayName, originSymbol: originSymbol, extendedModuleName : extends . extendedModule )
253
+ try inheritanceIndex. add ( child. reference, to: parent. reference, childSymbol: childSymbol, originDisplayName: origin. displayName, originSymbol: originSymbol)
257
254
}
258
255
}
259
256
0 commit comments