mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[InterfacePrinting] Print stdlib internal protocols whose names start with no '_'
rdar://21515803 Swift SVN r30178
This commit is contained in:
@@ -141,6 +141,8 @@ void swift::ide::printSubmoduleInterface(
|
||||
const PrintOptions &Options) {
|
||||
auto AdjustedOptions = Options;
|
||||
adjustPrintOptions(AdjustedOptions);
|
||||
auto PrintInternalProtocol = Options.PrintInternalStdlibProtocols &&
|
||||
M->isStdlibModule();
|
||||
|
||||
SmallVector<Decl *, 1> Decls;
|
||||
M->getDisplayDecls(Decls);
|
||||
@@ -208,6 +210,10 @@ void swift::ide::printSubmoduleInterface(
|
||||
if (Options.SkipUnavailable && D->getAttrs().isUnavailable(SwiftContext))
|
||||
continue;
|
||||
|
||||
if (PrintInternalProtocol && ASTPrinter::isInternalProtocol(D)) {
|
||||
SwiftDecls.push_back(D);
|
||||
}
|
||||
|
||||
// Skip declarations that are not accessible.
|
||||
if (auto *VD = dyn_cast<ValueDecl>(D)) {
|
||||
if (Options.AccessibilityFilter > Accessibility::Private &&
|
||||
|
||||
Reference in New Issue
Block a user