mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "SILGen: Explicitly make fragile entities public when -sil-serialize-all is on"
This commit caused link failures across several stdlib tests.
This reverts commit 672356047d.
This commit is contained in:
@@ -324,15 +324,8 @@ SILLinkage SILDeclRef::getLinkage(ForDefinition_t forDefinition) const {
|
||||
if (isa<ClangModuleUnit>(derivedFor->getModuleScopeContext()))
|
||||
return ClangLinkage;
|
||||
}
|
||||
|
||||
// If the module is being built with -sil-serialize-all, everything has
|
||||
// to have public linkage.
|
||||
if (moduleContext->getParentModule()->getResilienceStrategy()
|
||||
== ResilienceStrategy::Fragile) {
|
||||
return (forDefinition ? SILLinkage::Public : SILLinkage::PublicExternal);
|
||||
}
|
||||
|
||||
// Otherwise, linkage is determined by accessibility at the AST level.
|
||||
|
||||
// Otherwise, we have external linkage.
|
||||
switch (d->getEffectiveAccess()) {
|
||||
case Accessibility::Private:
|
||||
return (forDefinition ? SILLinkage::Private : SILLinkage::PrivateExternal);
|
||||
|
||||
Reference in New Issue
Block a user