[Serialization] Drop a class if the superclass can't be found

...instead of crashing. Also drop the class if its generic
requirements depend on a type that can't be loaded (instead of
crashing).

rdar://problem/50125674
This commit is contained in:
Jordan Rose
2019-05-16 13:36:21 -07:00
parent 64ce7b960d
commit ff7c6f6702
11 changed files with 202 additions and 22 deletions

View File

@@ -52,7 +52,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 = 491; // mangled class names as vtable keys
const uint16_t SWIFTMODULE_VERSION_MINOR = 492; // dependency types for classes
using DeclIDField = BCFixed<31>;
@@ -981,7 +981,8 @@ namespace decls_block {
TypeIDField, // superclass
AccessLevelField, // access level
BCVBR<4>, // number of conformances
BCArray<TypeIDField> // inherited types
BCVBR<4>, // number of inherited types
BCArray<TypeIDField> // inherited types, followed by dependency types
// Trailed by the generic parameters (if any), the members record, and
// finally conformance info (if any).
>;