Merge pull request #16268 from DougGregor/substitution-map-ast-adoption

[AST] Adopt SubstitutionMap as the storage mechanism for substitutions
This commit is contained in:
Doug Gregor
2018-04-30 20:36:02 -07:00
committed by GitHub
12 changed files with 323 additions and 118 deletions

View File

@@ -308,6 +308,9 @@ private:
/// Generic environments referenced by this module.
std::vector<Serialized<GenericEnvironment *>> GenericEnvironments;
/// Substitution maps referenced by this module.
std::vector<Serialized<SubstitutionMap>> SubstitutionMaps;
/// Represents an identifier that may or may not have been deserialized yet.
///
/// If \c Offset is non-zero, the identifier has not been loaded yet.
@@ -836,6 +839,10 @@ public:
GenericEnvironment *getGenericEnvironment(
serialization::GenericEnvironmentID ID);
/// Returns the substitution map for the given ID, deserializing it if
/// needed.
SubstitutionMap getSubstitutionMap(serialization::SubstitutionMapID id);
/// Reads a substitution record from \c DeclTypeCursor.
///
/// If the record at the cursor is not a substitution, returns None.