mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user