Merge pull request #35575 from egorzhdan/sk-impl-only

SourceKit: do not print implementation-only imports
This commit is contained in:
Argyrios Kyrtzidis
2021-01-27 15:46:02 -08:00
committed by GitHub
3 changed files with 8 additions and 1 deletions

View File

@@ -609,6 +609,9 @@ void swift::ide::printModuleInterface(
}
auto ShouldPrintImport = [&](ImportDecl *ImportD) -> bool {
if (ImportD->getAttrs().hasAttribute<ImplementationOnlyAttr>())
return false;
if (!TargetClangMod)
return true;
if (ImportD->getModule() == TargetMod)