mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Simplify SubstitutionMap representation
There was a bunch of logic to lazily populate replacement types corresponding to reducible generic parameters. This didn't seem to have a clear purpose so let's remove it.
This commit is contained in:
@@ -5296,21 +5296,11 @@ void SubstitutionMap::Storage::Profile(
|
||||
id.AddPointer(genericSig.getPointer());
|
||||
if (!genericSig) return;
|
||||
|
||||
// Profile those replacement types that corresponding to canonical generic
|
||||
// parameters within the generic signature.
|
||||
id.AddInteger(replacementTypes.size());
|
||||
|
||||
unsigned i = 0;
|
||||
genericSig->forEachParam([&](GenericTypeParamType *gp, bool canonical) {
|
||||
if (canonical)
|
||||
id.AddPointer(replacementTypes[i].getPointer());
|
||||
else
|
||||
id.AddPointer(nullptr);
|
||||
++i;
|
||||
});
|
||||
// Replacement types.
|
||||
for (auto replacementType : replacementTypes)
|
||||
id.AddPointer(replacementType.getPointer());
|
||||
|
||||
// Conformances.
|
||||
id.AddInteger(conformances.size());
|
||||
for (auto conformance : conformances)
|
||||
id.AddPointer(conformance.getOpaqueValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user