Skip to content

Commit 405ba5b

Browse files
committed
SIL: Simplify SILCloner::remapRootOpenedType()
1 parent 5f5b820 commit 405ba5b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

include/swift/SIL/SILCloner.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
255255

256256
auto sig = Builder.getFunction().getGenericSignature();
257257
auto existentialTy = archetypeTy->getExistentialType()->getCanonicalType();
258-
auto env = GenericEnvironment::forOpenedExistential(
259-
getOpASTType(existentialTy), sig, UUID::fromTime());
260-
auto interfaceTy = OpenedArchetypeType::getSelfInterfaceTypeFromContext(sig, existentialTy->getASTContext());
261-
auto replacementTy =
262-
env->mapTypeIntoContext(interfaceTy)
263-
->template castTo<OpenedArchetypeType>();
258+
auto replacementTy = OpenedArchetypeType::get(existentialTy, sig);
264259
registerOpenedExistentialRemapping(archetypeTy, replacementTy);
265260
}
266261

0 commit comments

Comments
 (0)