[SymbolGraph] Don't emit extension symbol graphs if empty

rdar://63058801
This commit is contained in:
Ashley Garland
2020-06-04 15:40:07 -07:00
parent 5e1eadc96f
commit 0e7a329ccd
3 changed files with 16 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ symbolgraphgen::emitSymbolGraphForModule(ModuleDecl *M,
Success |= serializeSymbolGraph(Walker.MainGraph, Options);
for (const auto &Entry : Walker.ExtendedModuleGraphs) {
if (Entry.getValue()->empty()) {
continue;
}
Success |= serializeSymbolGraph(*Entry.getValue(), Options);
}