@@ -248,7 +248,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
248
248
return asImpl ().remapASTType (ty);
249
249
}
250
250
251
- void remapOpenedType (CanOpenedArchetypeType archetypeTy) {
251
+ void remapRootOpenedType (CanOpenedArchetypeType archetypeTy) {
252
252
assert (archetypeTy->isRoot ());
253
253
254
254
auto existentialTy = archetypeTy->getExistentialType ()->getCanonicalType ();
@@ -2201,7 +2201,7 @@ template<typename ImplClass>
2201
2201
void
2202
2202
SILCloner<ImplClass>::visitOpenExistentialAddrInst(OpenExistentialAddrInst *Inst) {
2203
2203
// Create a new archetype for this opened existential type.
2204
- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2204
+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2205
2205
2206
2206
getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
2207
2207
recordClonedInstruction (
@@ -2214,7 +2214,7 @@ template <typename ImplClass>
2214
2214
void SILCloner<ImplClass>::visitOpenExistentialValueInst(
2215
2215
OpenExistentialValueInst *Inst) {
2216
2216
// Create a new archetype for this opened existential type.
2217
- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2217
+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2218
2218
2219
2219
getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
2220
2220
recordClonedInstruction (
@@ -2237,7 +2237,7 @@ visitOpenExistentialMetatypeInst(OpenExistentialMetatypeInst *Inst) {
2237
2237
exType = exMetatype->getExistentialInstanceType ()->getCanonicalType ();
2238
2238
openedType = cast<MetatypeType>(openedType).getInstanceType ();
2239
2239
}
2240
- remapOpenedType (cast<OpenedArchetypeType>(openedType));
2240
+ remapRootOpenedType (cast<OpenedArchetypeType>(openedType));
2241
2241
2242
2242
if (!Inst->getOperand ()->getType ().canUseExistentialRepresentation (
2243
2243
ExistentialRepresentation::Class)) {
@@ -2261,7 +2261,7 @@ void
2261
2261
SILCloner<ImplClass>::
2262
2262
visitOpenExistentialRefInst (OpenExistentialRefInst *Inst) {
2263
2263
// Create a new archetype for this opened existential type.
2264
- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2264
+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2265
2265
2266
2266
getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
2267
2267
recordClonedInstruction (
@@ -2278,7 +2278,7 @@ void
2278
2278
SILCloner<ImplClass>::
2279
2279
visitOpenExistentialBoxInst (OpenExistentialBoxInst *Inst) {
2280
2280
// Create a new archetype for this opened existential type.
2281
- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2281
+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2282
2282
2283
2283
getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
2284
2284
recordClonedInstruction (Inst, getBuilder ().createOpenExistentialBox (
@@ -2292,7 +2292,7 @@ void
2292
2292
SILCloner<ImplClass>::
2293
2293
visitOpenExistentialBoxValueInst (OpenExistentialBoxValueInst *Inst) {
2294
2294
// Create a new archetype for this opened existential type.
2295
- remapOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2295
+ remapRootOpenedType (Inst->getType ().castTo <OpenedArchetypeType>());
2296
2296
2297
2297
getBuilder ().setCurrentDebugScope (getOpScope (Inst->getDebugScope ()));
2298
2298
recordClonedInstruction (
0 commit comments