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:
Ben Langmuir
2016-03-29 12:57:20 -07:00
parent 92b3e153b8
commit 54a411d4d9
10 changed files with 17 additions and 35 deletions

View File

@@ -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);