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:
@@ -1646,6 +1646,14 @@ ModuleFile::getCommentForDeclByUSR(StringRef USR) const {
|
||||
return *I;
|
||||
}
|
||||
|
||||
Optional<StringRef>
|
||||
ModuleFile::getGroupNameByUSR(StringRef USR) const {
|
||||
if (auto Comment = getCommentForDeclByUSR(USR)) {
|
||||
return getGroupNameById(Comment.getValue().Group);
|
||||
}
|
||||
return None;
|
||||
}
|
||||
|
||||
Identifier ModuleFile::getDiscriminatorForPrivateValue(const ValueDecl *D) {
|
||||
Identifier discriminator = PrivateDiscriminatorsByValue.lookup(D);
|
||||
assert(!discriminator.empty() && "no discriminator found for decl");
|
||||
|
||||
Reference in New Issue
Block a user