Skip to content

Commit 87755a4

Browse files
authored
Merge pull request #18453 from atrick/revert-unexpected-box-use
Temoprarily revert AllocBoxToStack change to handle general applies.
2 parents 1a1f174 + 3ab54d5 commit 87755a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SILOptimizer/Transforms/AllocBoxToStack.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ static bool partialApplyEscapes(SILValue V, bool examineApply) {
301301
continue;
302302
}
303303

304-
if (auto Apply = FullApplySite::isa(User)) {
304+
if (auto AI = dyn_cast<ApplyInst>(User)) {
305+
ApplySite Apply(AI);
306+
305307
// Applying a function does not cause the function to escape.
306308
if (!Apply.isArgumentOperand(*Op))
307309
continue;

0 commit comments

Comments
 (0)