mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SourceKit: do not print implementation-only imports
Implementation-only imports are unnecessary in generated module interfaces, since they aren't exported to the module's dependencies, and the module's public API cannot refer to symbols imported as implementation-only.
This commit is contained in:
@@ -499,6 +499,10 @@ void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
|
||||
if (Dep.isExported())
|
||||
ID->getAttrs().add(
|
||||
new (Ctx) ExportedAttr(/*IsImplicit=*/false));
|
||||
if (Dep.isImplementationOnly())
|
||||
ID->getAttrs().add(
|
||||
new (Ctx) ImplementationOnlyAttr(/*IsImplicit=*/false));
|
||||
|
||||
ImportDecls.push_back(ID);
|
||||
}
|
||||
Bits.ComputedImportDecls = true;
|
||||
|
||||
Reference in New Issue
Block a user