[Serialization] Drop typealiases whose underlying types have changed. (#8896)

In order to accomplish this, cross-module references to typealiases
are now banned except from within conformances and NameAliasTypes, the
latter of which records the canonical type to determine if the
typealias has changed. For conformances, we don't have a good way to
check if the typealias has changed without trying to map it into
context, but that's all right---the rest of the compiler can already
fall back to the canonical type.
This commit is contained in:
Jordan Rose
2017-04-21 13:17:12 -07:00
committed by GitHub
parent 8979fcc4d9
commit f1902fd719
8 changed files with 123 additions and 10 deletions

View File

@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
/// in source control, you should also update the comment to briefly
/// 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.
const uint16_t VERSION_MINOR = 335; // Last change: no type in objc method table
const uint16_t VERSION_MINOR = 336; // Last change: typealias canonical type
using DeclID = PointerEmbeddedInt<unsigned, 31>;
using DeclIDField = BCFixed<31>;
@@ -571,7 +571,8 @@ namespace decls_block {
using NameAliasTypeLayout = BCRecordLayout<
NAME_ALIAS_TYPE,
DeclIDField // typealias decl
DeclIDField, // typealias decl
TypeIDField // canonical type (a fallback)
>;
using GenericTypeParamTypeLayout = BCRecordLayout<