mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Add a new query to collect all group names from a module.
Input: Request Id: 'source.request.module.groups' Required field: 'key.modulename' Output: Array of group names in that module, if any.
This commit is contained in:
@@ -1556,6 +1556,14 @@ Optional<StringRef> ModuleFile::getGroupNameForDecl(const Decl *D) {
|
||||
return getGroupNameById(Triple.getValue().Group);
|
||||
}
|
||||
|
||||
void ModuleFile::collectAllGroups(std::vector<StringRef> &Names) {
|
||||
if (!GroupNamesMap)
|
||||
return;
|
||||
for (auto It = GroupNamesMap->begin(); It != GroupNamesMap->end(); ++ It) {
|
||||
Names.push_back(It->getSecond());
|
||||
}
|
||||
}
|
||||
|
||||
Optional<BriefAndRawComment> ModuleFile::getCommentForDeclByUSR(StringRef USR) {
|
||||
if (!DeclCommentTable)
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user