mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Strengthen signature of SubstututionMap::addSubstitution().
It requires a CanSubstitutableType internally, so use that in the signature and fix up all of the callers.
This commit is contained in:
@@ -645,7 +645,8 @@ bool CSE::processOpenExistentialRef(SILInstruction *Inst, ValueBase *V,
|
||||
auto OldOpenedArchetype = getOpenedArchetypeOf(Inst);
|
||||
auto NewOpenedArchetype = getOpenedArchetypeOf(dyn_cast<SILInstruction>(V));
|
||||
SubstitutionMap TypeSubstMap;
|
||||
TypeSubstMap.addSubstitution(CanType(OldOpenedArchetype), NewOpenedArchetype);
|
||||
TypeSubstMap.addSubstitution(CanArchetypeType(OldOpenedArchetype),
|
||||
NewOpenedArchetype);
|
||||
// Collect all candidates that may contain opened archetypes
|
||||
// that need to be replaced.
|
||||
for (auto Use : Inst->getUses()) {
|
||||
|
||||
Reference in New Issue
Block a user