@@ -248,7 +248,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
248248 return asImpl ().remapASTType (ty);
249249 }
250250
251- void remapOpenedType (CanOpenedArchetypeType archetypeTy) {
251+ void remapRootOpenedType (CanOpenedArchetypeType archetypeTy) {
252252 assert (archetypeTy->isRoot ());
253253
254254 auto existentialTy = archetypeTy->getExistentialType ()->getCanonicalType ();
@@ -2201,7 +2201,7 @@ template<typename ImplClass>
22012201void
22022202SILCloner<ImplClass>::visitOpenExistentialAddrInst(OpenExistentialAddrInst *Inst) {
22032203 // Create a new archetype for this opened existential type.
2204- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2204+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
22052205
22062206 getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
22072207 recordClonedInstruction (
@@ -2214,7 +2214,7 @@ template <typename ImplClass>
22142214void SILCloner<ImplClass>::visitOpenExistentialValueInst(
22152215 OpenExistentialValueInst *Inst) {
22162216 // Create a new archetype for this opened existential type.
2217- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2217+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
22182218
22192219 getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
22202220 recordClonedInstruction (
@@ -2237,7 +2237,7 @@ visitOpenExistentialMetatypeInst(OpenExistentialMetatypeInst *Inst) {
22372237 exType = exMetatype->getExistentialInstanceType ()->getCanonicalType ();
22382238 openedType = cast<MetatypeType>(openedType).getInstanceType ();
22392239 }
2240- remapOpenedType (cast<OpenedArchetypeType>(openedType));
2240+ remapRootOpenedType (cast<OpenedArchetypeType>(openedType));
22412241
22422242 if (!Inst->getOperand ()->getType ().canUseExistentialRepresentation (
22432243 ExistentialRepresentation::Class)) {
@@ -2261,7 +2261,7 @@ void
22612261SILCloner<ImplClass>::
22622262visitOpenExistentialRefInst (OpenExistentialRefInst *Inst) {
22632263 // Create a new archetype for this opened existential type.
2264- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2264+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
22652265
22662266 getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
22672267 recordClonedInstruction (
@@ -2278,7 +2278,7 @@ void
22782278SILCloner<ImplClass>::
22792279visitOpenExistentialBoxInst (OpenExistentialBoxInst *Inst) {
22802280 // Create a new archetype for this opened existential type.
2281- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2281+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
22822282
22832283 getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
22842284 recordClonedInstruction (Inst, getBuilder ().createOpenExistentialBox (
@@ -2292,7 +2292,7 @@ void
22922292SILCloner<ImplClass>::
22932293visitOpenExistentialBoxValueInst (OpenExistentialBoxValueInst *Inst) {
22942294 // Create a new archetype for this opened existential type.
2295- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2295+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
22962296
22972297 getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
22982298 recordClonedInstruction (
0 commit comments