[SymbolGraph] Don't link type identifier fragments to private symbols

These links will never resolve because the symbols are never emitted
in the first place.

rdar://64178490
This commit is contained in:
Ashley Garland
2020-08-07 12:31:16 -07:00
parent c6cd4b07b2
commit ecf8d556e5
4 changed files with 31 additions and 7 deletions

View File

@@ -558,7 +558,7 @@ void
SymbolGraph::serializeDeclarationFragments(StringRef Key,
const Symbol &S,
llvm::json::OStream &OS) {
DeclarationFragmentPrinter Printer(OS, Key);
DeclarationFragmentPrinter Printer(this, OS, Key);
auto Options = getDeclarationFragmentsPrintOptions();
if (S.getSynthesizedBaseType()) {
Options.setBaseType(S.getSynthesizedBaseType());
@@ -570,7 +570,7 @@ void
SymbolGraph::serializeNavigatorDeclarationFragments(StringRef Key,
const Symbol &S,
llvm::json::OStream &OS) {
DeclarationFragmentPrinter Printer(OS, Key);
DeclarationFragmentPrinter Printer(this, OS, Key);
if (const auto *TD = dyn_cast<GenericTypeDecl>(S.getSymbolDecl())) {
Printer.printAbridgedType(TD, /*PrintKeyword=*/false);
@@ -587,7 +587,7 @@ void
SymbolGraph::serializeSubheadingDeclarationFragments(StringRef Key,
const Symbol &S,
llvm::json::OStream &OS) {
DeclarationFragmentPrinter Printer(OS, Key);
DeclarationFragmentPrinter Printer(this, OS, Key);
if (const auto *TD = dyn_cast<GenericTypeDecl>(S.getSymbolDecl())) {
Printer.printAbridgedType(TD, /*PrintKeyword=*/true);
@@ -603,7 +603,7 @@ SymbolGraph::serializeSubheadingDeclarationFragments(StringRef Key,
void
SymbolGraph::serializeDeclarationFragments(StringRef Key, Type T,
llvm::json::OStream &OS) {
DeclarationFragmentPrinter Printer(OS, Key);
DeclarationFragmentPrinter Printer(this, OS, Key);
T->print(Printer, getDeclarationFragmentsPrintOptions());
}