Move Symbol logic into SymbolGraph

Up to now, the `SymbolGraphASTWalker` was only concerned with one module. This
change prepares for emitting multiple symbol graph files, for each module that
the module of interest extended. There is only one walker, so extract the
symbol logic into `SymbolGraph`, where it can be reused.

rdar://58941718
This commit is contained in:
Ashley Garland
2020-02-06 15:26:11 -08:00
parent a4ba2cec27
commit be68f864e0
11 changed files with 390 additions and 391 deletions

View File

@@ -50,7 +50,7 @@ symbolgraphgen::emitSymbolGraphForModule(ModuleDecl *M,
}
llvm::json::OStream J(OS, Options.PrettyPrint ? 2 : 0);
Walker.Graph.serialize(Walker, J);
Walker.Graph.serialize(J);
return EXIT_SUCCESS;
}