mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[serialization] Write substitution conformances as references when possible.
More importantly, when writing substitution conformances /within the same module/, use an "incomplete" form of the NormalProtocolConformance layout that doesn't include any of the substitutions or defaulted definitions. This avoids a serialization cycle when the witness for a protocol itself ends up conforming to the protocol. I couldn't come up with a reduced test cases, but both cases filed by Dave now work. <rdar://problem/16468715> Swift SVN r15912
This commit is contained in:
@@ -307,12 +307,12 @@ private:
|
||||
/// If the record at the cursor is not a pattern, returns null.
|
||||
Pattern *maybeReadPattern();
|
||||
|
||||
/// Read the underlying conformance for a specialized or inherited
|
||||
/// protocol conformance.
|
||||
/// Read a referenced conformance, such as the underlying conformance for a
|
||||
/// specialized or inherited protocol conformance.
|
||||
ProtocolConformance *
|
||||
readUnderlyingConformance(ProtocolDecl *proto,
|
||||
readReferencedConformance(ProtocolDecl *proto,
|
||||
serialization::DeclID typeID,
|
||||
serialization::IdentifierID moduleID,
|
||||
serialization::ModuleID moduleID,
|
||||
llvm::BitstreamCursor &Cursor);
|
||||
|
||||
GenericParamList *maybeGetOrReadGenericParams(serialization::DeclID contextID,
|
||||
|
||||
Reference in New Issue
Block a user