[SymbolGraphGen] Address review comments on new printSymbolGraphForDecl entrypoint.

Change it to use EXIT_SUCCESS/FAILURE rather than a bool to match
emitSymbolGraphForModule.
This commit is contained in:
Nathan Hawes
2020-12-12 13:31:43 +10:00
parent 6b1722e9de
commit 968504db34
2 changed files with 7 additions and 5 deletions

View File

@@ -100,13 +100,13 @@ symbolgraphgen::emitSymbolGraphForModule(ModuleDecl *M,
return Success;
}
bool symbolgraphgen::
int symbolgraphgen::
printSymbolGraphForDecl(const ValueDecl *D, Type BaseTy,
bool InSynthesizedExtension,
const SymbolGraphOptions &Options,
llvm::raw_ostream &OS) {
if (!Symbol::supportsKind(D->getKind()))
return true;
return EXIT_FAILURE;
llvm::json::OStream JOS(OS, Options.PrettyPrint ? 2 : 0);
ModuleDecl *MD = D->getModuleContext();
@@ -121,5 +121,5 @@ printSymbolGraphForDecl(const ValueDecl *D, Type BaseTy,
Symbol MySym(&Graph, D, NTD, BaseTy);
Graph.recordNode(MySym);
Graph.serialize(JOS);
return false;
return EXIT_SUCCESS;
}