mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] In interface-gen request, allow clients to send SourceKit an interested USR from which we can infer the group name.
This commit is contained in:
@@ -182,6 +182,16 @@ swift::ide::collectModuleGroups(Module *M, std::vector<StringRef> &Scratch) {
|
||||
return llvm::makeArrayRef(Scratch);
|
||||
}
|
||||
|
||||
Optional<StringRef>
|
||||
swift::ide::findGroupNameForUSR(ModuleDecl *M, StringRef USR) {
|
||||
for (auto File : M->getFiles()) {
|
||||
if (auto Name = File->getGroupNameByUSR(USR)) {
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
return None;
|
||||
}
|
||||
|
||||
void swift::ide::printSubmoduleInterface(
|
||||
Module *M,
|
||||
ArrayRef<StringRef> FullModuleName,
|
||||
|
||||
Reference in New Issue
Block a user