[serialization] Serialize a table of all class members, by name.

This will be used for id-style lookup.

Swift SVN r7286
This commit is contained in:
Jordan Rose
2013-08-16 20:22:07 +00:00
parent 26c1181502
commit cf6bb91b20
5 changed files with 112 additions and 57 deletions

View File

@@ -760,6 +760,13 @@ static inline decls_block::RecordKind getKindForTable(const Decl *D) {
case DeclKind::Var:
return decls_block::VAR_DECL;
case DeclKind::Subscript:
return decls_block::SUBSCRIPT_DECL;
case DeclKind::Constructor:
return decls_block::CONSTRUCTOR_DECL;
case DeclKind::Destructor:
return decls_block::DESTRUCTOR_DECL;
default:
llvm_unreachable("cannot store this kind of decl in a hash table");
}
@@ -788,7 +795,8 @@ namespace index_block {
IDENTIFIER_OFFSETS,
TOP_LEVEL_DECLS,
OPERATORS,
EXTENSIONS
EXTENSIONS,
CLASS_MEMBERS
};
using OffsetsLayout = BCGenericRecordLayout<