[Serialization] Give generic environments identitity.

Serialize generic environments via a generic environment ID with a
separte offset table, so we have identity for the generic environments
and will share generic environments on deserialization.
This commit is contained in:
Doug Gregor
2016-12-13 16:55:21 -08:00
parent 2ff90611a8
commit 821965dee4
9 changed files with 427 additions and 303 deletions

View File

@@ -535,6 +535,10 @@ bool ModuleFile::readIndexBlock(llvm::BitstreamCursor &cursor) {
assert(blobData.empty());
LocalDeclContexts.assign(scratch.begin(), scratch.end());
break;
case index_block::GENERIC_ENVIRONMENT_OFFSETS:
assert(blobData.empty());
GenericEnvironments.assign(scratch.begin(), scratch.end());
break;
case index_block::NORMAL_CONFORMANCE_OFFSETS:
assert(blobData.empty());
NormalConformances.assign(scratch.begin(), scratch.end());