[value-lifetime] Cleanup constructors.

This commit is contained in:
Michael Gottesman
2020-11-15 16:22:09 -08:00
parent c2b3be497d
commit 7718bd1fed
2 changed files with 31 additions and 10 deletions

View File

@@ -937,7 +937,8 @@ specializeApplySite(SILOptFunctionBuilder &FuncBuilder, ApplySite Apply,
// release it explicitly when the partial_apply is released.
if (Apply.getKind() == ApplySiteKind::PartialApplyInst) {
if (PAFrontier.empty()) {
ValueLifetimeAnalysis VLA(cast<PartialApplyInst>(Apply));
auto *PAI = cast<PartialApplyInst>(Apply);
ValueLifetimeAnalysis VLA(PAI, PAI->getUses());
pass.CFGChanged |= !VLA.computeFrontier(
PAFrontier, ValueLifetimeAnalysis::AllowToModifyCFG);
assert(!PAFrontier.empty() &&