[serialization] Add support for classes.

Classes are exactly like structs except that they may have a base class.
However, this type will show up in the inheritance list. That means we
don't actually need to serialize it twice; we can just grab the base class
from the inheritance list.

Swift SVN r6133
This commit is contained in:
Jordan Rose
2013-07-10 23:25:34 +00:00
parent f24add3175
commit 9a67bc597e
6 changed files with 231 additions and 17 deletions

View File

@@ -165,7 +165,13 @@ private:
/// Creates an array of types from the given IDs.
///
/// The returned array is owned by the ASTContext.
MutableArrayRef<TypeLoc> getTypes(ArrayRef<uint64_t> rawTypeIDs);
///
/// \param rawTypeIDs An array of TypeID values, but using \c uint64_t for
/// compatibility with BitstreamReader.
/// \param[out] classType If non-null, and one of the type IDs resolves to a
/// class type, this will be set to that type.
MutableArrayRef<TypeLoc> getTypes(ArrayRef<uint64_t> rawTypeIDs,
Type *classType = nullptr);
/// Reads members of a DeclContext from \c DeclTypeCursor.
///