mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Module interface printing: add an option to filter declarations based on
access control Swift SVN r20399
This commit is contained in:
@@ -203,6 +203,14 @@ void swift::ide::printSubmoduleInterface(
|
||||
if (Options.SkipUnavailable && D->getAttrs().isUnavailable())
|
||||
continue;
|
||||
|
||||
// Skip declarations that are not accessible.
|
||||
if (auto *VD = dyn_cast<ValueDecl>(D)) {
|
||||
if (Options.AccessibilityFilter > Accessibility::Private &&
|
||||
VD->hasAccessibility() &&
|
||||
VD->getAccessibility() < Options.AccessibilityFilter)
|
||||
continue;
|
||||
}
|
||||
|
||||
auto ShouldPrintImport = [&](ImportDecl *ImportD) -> bool {
|
||||
if (!InterestingClangModule)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user