[SILGen] Update a few callers of SubstitutionMap::get to use getSingletonPackExpansion,

and update variadic generics SILGen tests for the representation change.
This commit is contained in:
Holly Borla
2023-03-06 22:03:27 -08:00
parent 74cc62735b
commit fa3ffc6a44
6 changed files with 22 additions and 15 deletions

View File

@@ -1712,7 +1712,12 @@ public:
auto gp = GenericTypeParamType::get(isParameterPack, 0, paramIndex,
TC.Context);
substGenericParams.push_back(gp);
substReplacementTypes.push_back(substTy);
if (isParameterPack) {
substReplacementTypes.push_back(
PackType::getSingletonPackExpansion(substTy));
} else {
substReplacementTypes.push_back(substTy);
}
if (auto layout = pattern.getLayoutConstraint()) {
// Look at the layout constraint on this position in the abstraction pattern