Eliminate NominalTypeDecl::(get|set)Conformances.

We now access the conformances of a nominal type through the
conformance lookup table, so there is no reason to continue storing
conformances directly on the nominal type declaration, which was
error-prone regardless. This mirrors the change to ExtensionDecl from
my previous commit.

Swift SVN r26354
This commit is contained in:
Doug Gregor
2015-03-20 16:32:25 +00:00
parent 9bd774fd57
commit 3f6a14ade6
5 changed files with 39 additions and 59 deletions

View File

@@ -961,9 +961,12 @@ void ConformanceLookupTable::forEachInStage(ConformanceStage stage,
resolver->resolveDeclSignature(nominal);
// If we have conformances we can load, do so.
if (!nominal->addedLoadedConformances()) {
nominal->setAddedLoadedConformances();
loadAllConformances(nominal, nominal, nominal->getConformances());
// FIXME: This could be more lazy.
auto loader = nominal->takeConformanceLoader();
if (loader.first) {
SmallVector<ProtocolConformance *, 2> conformances;
loader.first->loadAllConformances(nominal, loader.second, conformances);
loadAllConformances(nominal, nominal, conformances);
}
nominalFunc(nominal);