[SourceKit] CursorInfo: The result of cursor info for a module name starts to include group names in that module.

This commit is contained in:
Xi Ge
2016-03-21 16:29:18 -07:00
parent acdf28f440
commit 3dd149ab99
8 changed files with 55 additions and 1 deletions

View File

@@ -581,6 +581,11 @@ static bool passCursorInfoForModule(ModuleEntity Mod,
if (auto IFaceGenRef = IFaceGenContexts.find(Info.ModuleName, Invok))
Info.ModuleInterfaceName = IFaceGenRef->getDocumentName();
Info.IsSystem = Mod.isSystemModule();
std::vector<StringRef> Groups;
if (auto MD = Mod.getAsSwiftModule()) {
Info.ModuleGroupArray = ide::collectModuleGroups(const_cast<ModuleDecl*>(MD),
Groups);
}
Receiver(Info);
return false;
}