@@ -55,13 +55,17 @@ int serializeSymbolGraph(SymbolGraph &SG,
5555int
5656symbolgraphgen::emitSymbolGraphForModule (ModuleDecl *M,
5757 const SymbolGraphOptions &Options) {
58- SymbolGraphASTWalker Walker (*M, Options);
5958 SmallVector<Decl *, 64 > ModuleDecls;
6059 swift::getTopLevelDeclsForDisplay (M, ModuleDecls, /* recursive*/ true );
60+
61+ SmallPtrSet<ModuleDecl *, 4 > ExportedImportedModules;
62+ swift::collectParsedExportedImports (M, ExportedImportedModules);
6163
6264 if (Options.PrintMessages )
6365 llvm::errs () << ModuleDecls.size ()
6466 << " top-level declarations in this module.\n " ;
67+
68+ SymbolGraphASTWalker Walker (*M, ExportedImportedModules, Options);
6569
6670 for (auto *Decl : ModuleDecls) {
6771 Walker.walk (Decl);
@@ -98,7 +102,7 @@ printSymbolGraphForDecl(const ValueDecl *D, Type BaseTy,
98102
99103 llvm::json::OStream JOS (OS, Options.PrettyPrint ? 2 : 0 );
100104 ModuleDecl *MD = D->getModuleContext ();
101- SymbolGraphASTWalker Walker (*MD, Options);
105+ SymbolGraphASTWalker Walker (*MD, {}, Options);
102106 markup::MarkupContext MarkupCtx;
103107 SymbolGraph Graph (Walker, *MD, None, MarkupCtx, None,
104108 /* IsForSingleNode=*/ true );
0 commit comments