[Serialization] Make serialization of witnesses deterministic.

Serialization of the requirement-to-synthetic-environment map was
walking in DenseMap order. However, the keys to this map are
known---they're always the generic parameters of the requirement. So,
walk those generic parameters to make it deterministic, and don't
bother serializing them because they're known to the deserializer
already.

Fixes rdar://problem/29689811.
This commit is contained in:
Doug Gregor
2016-12-16 09:47:10 -08:00
parent 821965dee4
commit a9a8defe10
4 changed files with 53 additions and 55 deletions

View File

@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
/// in source control, you should also update the comment to briefly
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
const uint16_t VERSION_MINOR = 300; // Last change: Generic environment ID
const uint16_t VERSION_MINOR = 301; // Last change: Deterministic conformances
using DeclID = PointerEmbeddedInt<unsigned, 31>;
using DeclIDField = BCFixed<31>;