AST: Introduce new SubstitutionList type to replace ArrayRef<Substitution>

SubstitutionList is going to be a more compact representation of
a SubstitutionMap, suitable for inline allocation inside another
object.

For now, it's just a typedef for ArrayRef<Substitution>.
This commit is contained in:
Slava Pestov
2017-02-06 20:23:10 -08:00
parent e98ac967d4
commit 3519e0cd25
87 changed files with 370 additions and 315 deletions

View File

@@ -144,7 +144,7 @@ bool ReleaseDevirtualizer::createDeallocCall(SILType AllocType,
return false;
CanSILFunctionType DeallocType = Dealloc->getLoweredFunctionType();
ArrayRef<Substitution> AllocSubsts = AllocType.gatherAllSubstitutions(M);
SubstitutionList AllocSubsts = AllocType.gatherAllSubstitutions(M);
assert(!AllocSubsts.empty() == DeallocType->isPolymorphic() &&
"dealloc of generic class is not polymorphic or vice versa");