ASTPrinter: Move the logic for collecting all module groups from SourceKit to an IDE API, NFC.

This commit is contained in:
Xi Ge
2016-02-22 11:05:23 -08:00
parent 24cede9543
commit bf1436a367
3 changed files with 18 additions and 7 deletions

View File

@@ -901,11 +901,6 @@ void SwiftLangSupport::findModuleGroups(StringRef ModuleName,
Receiver(Groups, Error);
return;
}
for (auto File : M->getFiles()) {
File->collectAllGroups(Groups);
}
std::sort(Groups.begin(), Groups.end(), [](StringRef L, StringRef R) {
return L.compare_lower(R) < 0;
});
Receiver(Groups, Error);
std::vector<StringRef> Scratch;
Receiver(collectModuleGroups(M, Scratch), Error);
}