Convert DeclContext Parameters to their Associated Generic Signatures Instead

This commit is contained in:
Robert Widmann
2022-03-07 22:53:56 -08:00
parent 01d9d61cc8
commit ab44a07045
26 changed files with 148 additions and 111 deletions

View File

@@ -446,10 +446,9 @@ void ExistentialTransform::populateThunkBody() {
OpenedArchetypeType *Opened;
auto OrigOperand = ThunkBody->getArgument(ArgDesc.Index);
auto SwiftType = ArgDesc.Arg->getType().getASTType();
auto *DC = F->getDeclContext() ? F->getDeclContext() : M.getSwiftModule();
auto OpenedType =
SwiftType
->openAnyExistentialType(Opened, DC)
->openAnyExistentialType(Opened, F->getGenericSignature())
->getCanonicalType();
auto OpenedSILType = NewF->getLoweredType(OpenedType);
SILValue archetypeValue;