mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Preserve private discriminators through serialization.
Part of rdar://problem/17632175 Swift SVN r21611
This commit is contained in:
@@ -160,6 +160,8 @@ TRAILING_INFO(GENERIC_PARAM)
|
||||
TRAILING_INFO(GENERIC_REQUIREMENT)
|
||||
TRAILING_INFO(LAST_GENERIC_REQUIREMENT)
|
||||
|
||||
OTHER(DISCRIMINATOR, 249)
|
||||
|
||||
OTHER(NO_CONFORMANCE, 250)
|
||||
OTHER(NORMAL_PROTOCOL_CONFORMANCE, 251)
|
||||
OTHER(SPECIALIZED_PROTOCOL_CONFORMANCE, 252)
|
||||
|
||||
@@ -250,6 +250,8 @@ private:
|
||||
std::unique_ptr<SerializedDeclTable> ClassMembersByName;
|
||||
std::unique_ptr<SerializedDeclTable> OperatorMethodDecls;
|
||||
|
||||
llvm::DenseMap<const ValueDecl *, Identifier> PrivateDiscriminatorsByValue;
|
||||
|
||||
TinyPtrVector<Decl *> ImportDecls;
|
||||
|
||||
using DeclIDVector = SmallVector<serialization::DeclID, 4>;
|
||||
|
||||
@@ -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 = 131;
|
||||
const uint16_t VERSION_MINOR = 132;
|
||||
|
||||
using DeclID = Fixnum<31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -947,6 +947,13 @@ namespace decls_block {
|
||||
BCFixed<1> // dummy
|
||||
>;
|
||||
|
||||
/// Specifies the discriminator string for a private declaration. This
|
||||
/// identifies the declaration's original source file in some opaque way.
|
||||
using DiscriminatorLayout = BCRecordLayout<
|
||||
DISCRIMINATOR,
|
||||
IdentifierIDField // discriminator string, as an identifier
|
||||
>;
|
||||
|
||||
/// A placeholder for lack of conformance information. Conformances are
|
||||
/// indexed, so simply omitting one would be incorrect.
|
||||
using NoConformanceLayout = BCRecordLayout<
|
||||
|
||||
Reference in New Issue
Block a user