Skip to content

Commit 284262d

Browse files
committed
[SILGenCleanup] Handle leaky OSSA.
Use the new AvailabilityWithLeaks boundary.
1 parent 6324067 commit 284262d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/SILOptimizer/Mandatory/SILGenCleanup.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ bool SILGenCleanup::completeOSSALifetimes(SILFunction *function) {
118118
for (SILInstruction &inst : reverse(*block)) {
119119
for (auto result : inst.getResults()) {
120120
if (completion.completeOSSALifetime(
121-
result, OSSALifetimeCompletion::Boundary::Availability) ==
121+
result,
122+
OSSALifetimeCompletion::Boundary::AvailabilityWithLeaks) ==
122123
LifetimeCompletion::WasCompleted) {
123124
changed = true;
124125
}
@@ -127,7 +128,7 @@ bool SILGenCleanup::completeOSSALifetimes(SILFunction *function) {
127128
for (SILArgument *arg : block->getArguments()) {
128129
assert(!arg->isReborrow() && "reborrows not legal at this SIL stage");
129130
if (completion.completeOSSALifetime(
130-
arg, OSSALifetimeCompletion::Boundary::Availability) ==
131+
arg, OSSALifetimeCompletion::Boundary::AvailabilityWithLeaks) ==
131132
LifetimeCompletion::WasCompleted) {
132133
changed = true;
133134
}

0 commit comments

Comments
 (0)