mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* Revert "Revert "[SymbolGraphGen] synthesize child symbols for type aliases of private…" (#79062)"
This reverts commit cac82978bc.
* clean up use of DenseMap in SymbolGraphGen
rdar://143865173
This commit is contained in:
@@ -37,19 +37,21 @@ using namespace swift;
|
||||
using namespace symbolgraphgen;
|
||||
|
||||
Symbol::Symbol(SymbolGraph *Graph, const ExtensionDecl *ED,
|
||||
const NominalTypeDecl *SynthesizedBaseTypeDecl, Type BaseType)
|
||||
const ValueDecl *SynthesizedBaseTypeDecl, Type BaseType)
|
||||
: Symbol::Symbol(Graph, nullptr, ED, SynthesizedBaseTypeDecl, BaseType) {}
|
||||
|
||||
Symbol::Symbol(SymbolGraph *Graph, const ValueDecl *VD,
|
||||
const NominalTypeDecl *SynthesizedBaseTypeDecl, Type BaseType)
|
||||
const ValueDecl *SynthesizedBaseTypeDecl, Type BaseType)
|
||||
: Symbol::Symbol(Graph, VD, nullptr, SynthesizedBaseTypeDecl, BaseType) {}
|
||||
|
||||
Symbol::Symbol(SymbolGraph *Graph, const ValueDecl *VD, const ExtensionDecl *ED,
|
||||
const NominalTypeDecl *SynthesizedBaseTypeDecl, Type BaseType)
|
||||
const ValueDecl *SynthesizedBaseTypeDecl, Type BaseType)
|
||||
: Graph(Graph), D(VD), BaseType(BaseType),
|
||||
SynthesizedBaseTypeDecl(SynthesizedBaseTypeDecl) {
|
||||
if (!BaseType && SynthesizedBaseTypeDecl)
|
||||
BaseType = SynthesizedBaseTypeDecl->getDeclaredInterfaceType();
|
||||
if (!BaseType && SynthesizedBaseTypeDecl) {
|
||||
if (const auto *NTD = dyn_cast<NominalTypeDecl>(SynthesizedBaseTypeDecl))
|
||||
BaseType = NTD->getDeclaredInterfaceType();
|
||||
}
|
||||
if (D == nullptr) {
|
||||
D = ED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user