File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -148,10 +148,15 @@ SwiftMangler::ExtensionOrFilePrivateValueIndex SwiftMangler::getExtensionOrFileP
148148}
149149
150150bool SwiftMangler::isExtensionOrFilePrivateValue (const swift::Decl* decl) {
151- return decl->getKind () == swift::DeclKind::Extension ||
152- (swift::isa<swift::ValueDecl>(decl) &&
153- swift::dyn_cast<swift::ValueDecl>(decl)->getFormalAccess () ==
154- swift::AccessLevel::FilePrivate);
151+ if (decl->getKind () == swift::DeclKind::Extension) {
152+ return true ;
153+ }
154+
155+ if (const auto * valueDecl = swift::dyn_cast<swift::ValueDecl>(decl)) {
156+ return valueDecl->getFormalAccess () == swift::AccessLevel::FilePrivate;
157+ }
158+
159+ return false ;
155160}
156161
157162void SwiftMangler::indexExtensionsAndFilePrivateValues (llvm::ArrayRef<swift::Decl*> siblings) {
You can’t perform that action at this time.
0 commit comments