Support package SIL linkage.

Decls with a package access level are currently set to public SIL
linkages. This limits the ability to have more fine-grained control
and optimize around resilience and serialization.
This PR introduces a separate SIL linkage and FormalLinkage for
package decls, pipes them down to IRGen, and updates linkage checks
at call sites to include package linkage.

Resolves rdar://121409846
This commit is contained in:
Ellie Shin
2024-01-22 19:53:12 -08:00
parent 1707e76ba8
commit 72a7760027
42 changed files with 1135 additions and 648 deletions

View File

@@ -292,7 +292,7 @@ std::unique_ptr<LazySwiftMaterializationUnit>
LazySwiftMaterializationUnit::Create(SwiftJIT &JIT, CompilerInstance &CI) {
auto *M = CI.getMainModule();
TBDGenOptions Opts;
Opts.PublicSymbolsOnly = false;
Opts.PublicOrPackageSymbolsOnly = false;
auto TBDDesc = TBDGenDescriptor::forModule(M, std::move(Opts));
SymbolSourceMapRequest SourceReq{TBDDesc};
const auto *Sources =