mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Support (de-)serialization of SubstitutionMaps.
Allow substitution maps to be serialized directly (via an ID), writing out the replacement types and conformances as appropriate. This is a more efficient form of serialization than the current SubstitutionList approach, because it maintains uniqueness of substitution maps within a module file, and is a step toward eliminating SubstitutionList entirely.
This commit is contained in:
@@ -852,6 +852,10 @@ bool ModuleFile::readIndexBlock(llvm::BitstreamCursor &cursor) {
|
||||
assert(blobData.empty());
|
||||
GenericEnvironments.assign(scratch.begin(), scratch.end());
|
||||
break;
|
||||
case index_block::SUBSTITUTION_MAP_OFFSETS:
|
||||
assert(blobData.empty());
|
||||
SubstitutionMaps.assign(scratch.begin(), scratch.end());
|
||||
break;
|
||||
case index_block::NORMAL_CONFORMANCE_OFFSETS:
|
||||
assert(blobData.empty());
|
||||
NormalConformances.assign(scratch.begin(), scratch.end());
|
||||
|
||||
Reference in New Issue
Block a user