mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ASTPrinter: Move the logic for collecting all module groups from SourceKit to an IDE API, NFC.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user