[Serialization] Collapse indirection in DeclContextID

...by making it a tagged union of either a DeclID or a
LocalDeclContextID. This should lead to smaller module files and be
slightly more efficient to deserialize, and also means that every
AST entity kind is serialized in exactly one way, which allows for
the following commit's refactoring.
This commit is contained in:
Jordan Rose
2019-08-23 13:48:59 -07:00
parent e56743e7b4
commit 9e1b206984
7 changed files with 116 additions and 161 deletions

View File

@@ -874,10 +874,6 @@ bool ModuleFile::readIndexBlock(llvm::BitstreamCursor &cursor) {
assert(blobData.empty());
allocateBuffer(Decls, scratch);
break;
case index_block::DECL_CONTEXT_OFFSETS:
assert(blobData.empty());
allocateBuffer(DeclContexts, scratch);
break;
case index_block::TYPE_OFFSETS:
assert(blobData.empty());
allocateBuffer(Types, scratch);