[IRGen/SIL] More widespread use of SubstitutionMap.

This commit is contained in:
Doug Gregor
2018-05-07 20:47:07 -07:00
parent 09446defef
commit d457f1c752
12 changed files with 33 additions and 54 deletions

View File

@@ -2085,14 +2085,14 @@ bool SimplifyCFG::simplifyTryApplyBlock(TryApplyInst *TAI) {
auto TargetFnTy = CalleeFnTy;
if (TargetFnTy->isPolymorphic()) {
TargetFnTy = TargetFnTy->substGenericArgs(TAI->getModule(),
TAI->getSubstitutions());
TAI->getSubstitutionMap());
}
SILFunctionConventions targetConv(TargetFnTy, TAI->getModule());
auto OrigFnTy = TAI->getCallee()->getType().getAs<SILFunctionType>();
if (OrigFnTy->isPolymorphic()) {
OrigFnTy = OrigFnTy->substGenericArgs(TAI->getModule(),
TAI->getSubstitutions());
TAI->getSubstitutionMap());
}
SILFunctionConventions origConv(OrigFnTy, TAI->getModule());