Serialization: introduce a conformance cross-reference so we don’t serialize normal protocol conformances in modules that didn’t declare them.

Swift SVN r20792
This commit is contained in:
Doug Gregor
2014-07-31 01:00:17 +00:00
parent bd2bd78b23
commit e098ce84fb
6 changed files with 38 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ const uint16_t VERSION_MAJOR = 0;
/// Serialized module format minor version number.
///
/// When the format changes IN ANY WAY, this number should be incremented.
const uint16_t VERSION_MINOR = 123;
const uint16_t VERSION_MINOR = 124;
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -930,6 +930,13 @@ namespace decls_block {
BCFixed<1> // dummy
>;
using XRefProtocolConformanceLayout = BCRecordLayout<
XREF_PROTOCOL_CONFORMANCE,
DeclIDField, // protocol
DeclIDField, // nominal type
ModuleIDField // module
>;
/// A placeholder for lack of conformance information. Conformances are
/// indexed, so simply omitting one would be incorrect.
using NoConformanceLayout = BCRecordLayout<