mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serializer] serialize the parent module of NormalProtocolConformance.
We used to just use FileContext at deserialization time. That causes multiple NormalProtocolConformances with the same protocol and type, but from different modules. And we will have issues at IRGen. With this commit, we serialize the parent module and deserialize the parent module, and we are not going to have multiple NormalProtocolConformances with the same protocol and type. rdar://16809311 Swift SVN r17675
This commit is contained in:
@@ -802,8 +802,9 @@ Serializer::writeConformance(const ProtocolDecl *protocol,
|
||||
unsigned numInheritedConformances = conf->getInheritedConformances().size();
|
||||
unsigned abbrCode
|
||||
= abbrCodes[NormalProtocolConformanceLayout::Code];
|
||||
auto moduleID = addModuleRef(conf->getDeclContext()->getParentModule());
|
||||
NormalProtocolConformanceLayout::emitRecord(Out, ScratchRecord, abbrCode,
|
||||
addDeclRef(protocol),
|
||||
addDeclRef(protocol), moduleID,
|
||||
numValueWitnesses,
|
||||
numTypeWitnesses,
|
||||
numInheritedConformances,
|
||||
|
||||
Reference in New Issue
Block a user