Delay loading the witnesses of a protocol conformance.

Apart from being general compile-time goodness, this helps break a
circularity issue involving serialization cross-references and the
Clang importer.

The test is being added to validation-tests because it relies on
several levels of non-laziness in the compiler, all of which we'd
like to fix. It's making sure we don't regress here, but it isn't
actually verifying this change in particular.

rdar://problem/22364953

Swift SVN r31455
This commit is contained in:
Jordan Rose
2015-08-25 21:47:18 +00:00
parent c707382e91
commit babdb9e9f9
9 changed files with 189 additions and 69 deletions

View File

@@ -599,6 +599,9 @@ public:
virtual TypeLoc loadAssociatedTypeDefault(const AssociatedTypeDecl *ATD,
uint64_t contextData) override;
virtual void finishNormalConformance(NormalProtocolConformance *conformance,
uint64_t contextData) override;
Optional<BriefAndRawComment> getCommentForDecl(const Decl *D);
Optional<BriefAndRawComment> getCommentForDeclByUSR(StringRef USR);
@@ -654,8 +657,8 @@ public:
ProtocolConformance *readConformance(llvm::BitstreamCursor &Cursor);
/// Read the given normal conformance from the current module file.
NormalProtocolConformance *readNormalConformance(
serialization::NormalConformanceID id);
NormalProtocolConformance *
readNormalConformance(serialization::NormalConformanceID id);
/// Reads a generic param list from \c DeclTypeCursor.
///