[Serialization] Drop overridden relationship in constructors when safe

Deserialization recovery lead the compiler to drop public constructors
overridding internal constructors. This limits the logic to dropping the
overriding relationship instead of the whole constructor. This applies
when the overriden constructor fails to deserialize and only when the
overriding relationship was marked as not affecting ABI.

rdar://104704832
This commit is contained in:
Alexis Laferrière
2023-01-27 13:10:21 -08:00
parent 4665053f5b
commit 9c16b4b013
4 changed files with 37 additions and 14 deletions

View File

@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 741; // SIL pack types
const uint16_t SWIFTMODULE_VERSION_MINOR = 742; // Constructor affects ABI
/// A standard hash seed used for all string hashes in a serialized module.
///
@@ -1455,6 +1455,7 @@ namespace decls_block {
CtorInitializerKindField, // initializer kind
GenericSignatureIDField, // generic environment
DeclIDField, // overridden decl
BCFixed<1>, // whether the overridden decl affects ABI
AccessLevelField, // access level
BCFixed<1>, // requires a new vtable slot
BCFixed<1>, // 'required' but overridden is not (used for recovery)