[serialization] Don't eagerly load extensions for deserialized nominals.

The only reason to do this was in case an extension adopted a compiler-known
protocol, but that has long ben taken care of by
ModuleFile::loadDeclsConformingTo.

Swift SVN r11224
This commit is contained in:
Jordan Rose
2013-12-13 00:26:11 +00:00
parent 037c674f05
commit a9e90b61e7

View File

@@ -545,10 +545,6 @@ void ModuleFile::lookupValue(Identifier name,
for (auto item : *iter) {
auto VD = cast<ValueDecl>(getDecl(item.second));
// Force load our own extensions, which may contain conformances.
if (auto TD = dyn_cast<TypeDecl>(VD))
if (auto nominal = TD->getDeclaredType()->getAnyNominal())
loadExtensions(nominal);
results.push_back(VD);
}
}
@@ -686,8 +682,6 @@ void ModuleFile::loadDeclsConformingTo(KnownProtocolKind kind) {
for (DeclID DID : KnownProtocolAdopters[index]) {
Decl *D = getDecl(DID);
getContext().recordConformance(kind, D);
if (auto nominal = getAnyNominal(D))
loadExtensions(nominal);
}
}