mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #65337 from xymus/spi-only-dep
[Serialization] Write down SPI only dependencies as required in swiftmodules
This commit is contained in:
@@ -1219,8 +1219,9 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
|
||||
// distinguish them.
|
||||
ImportSet publicImportSet =
|
||||
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Exported);
|
||||
ImportSet privateImportSet =
|
||||
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Default);
|
||||
ImportSet defaultImportSet =
|
||||
getImportsAsSet(M, {ModuleDecl::ImportFilterKind::Default,
|
||||
ModuleDecl::ImportFilterKind::SPIOnly});
|
||||
ImportSet packageOnlyImportSet =
|
||||
getImportsAsSet(M, ModuleDecl::ImportFilterKind::PackageOnly);
|
||||
ImportSet internalOrBelowImportSet =
|
||||
@@ -1270,7 +1271,7 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
|
||||
// form here.
|
||||
if (publicImportSet.count(import))
|
||||
stableImportControl = ImportControl::Exported;
|
||||
else if (privateImportSet.count(import))
|
||||
else if (defaultImportSet.count(import))
|
||||
stableImportControl = ImportControl::Normal;
|
||||
else if (packageOnlyImportSet.count(import))
|
||||
stableImportControl = ImportControl::PackageOnly;
|
||||
|
||||
Reference in New Issue
Block a user