Start serializing the "inherited" list of extension declarations.

This improves the fidelity of the AST printed from a loaded module, as
well as consistency in the AST. Also teach the Clang importer to add
"inherited" clauses, providing better fidelity for the mapping from
Objective-C to Swift.

With trivial update to SDKAnalyzer test.

Swift SVN r31344
This commit is contained in:
Doug Gregor
2015-08-19 21:10:42 +00:00
parent 53b1cf2b09
commit dd68b9fc59
9 changed files with 57 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
/// To ensure that two separate changes don't silently get merged into one
/// in source control, you should also update the comment to briefly
/// describe what change you made.
const uint16_t VERSION_MINOR = 213; // Last change: generic param superclass
const uint16_t VERSION_MINOR = 214; // Last change: extension inherited list
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -967,7 +967,8 @@ namespace decls_block {
TypeIDField, // base type
DeclContextIDField, // context decl
BCFixed<1>, // implicit flag
BCArray<DeclIDField> // protocols
BCVBR<4>, // # of protocols
BCArray<DeclIDField> // protocols and inherited types
// Trailed by the generic parameter lists, members record, and then
// conformance info (if any).
>;