Skip to content

Commit de5d2ec

Browse files
committed
[NFC] LifetimeCompletion: Improve lambda name.
This lambda has to do with availability or the lack thereof but unreachable instructions are of interest in this context so using the wrong name confuses things unnecessarily.
1 parent 2ee4024 commit de5d2ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SIL/Utils/OSSALifetimeCompletion.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,16 @@ void VisitUnreachableLifetimeEnds::visitAvailabilityBoundary(
291291
if (!available) {
292292
continue;
293293
}
294-
auto hasUnreachableSuccessor = [&]() {
294+
auto hasUnavailableSuccessor = [&]() {
295295
// Use a lambda to avoid checking if possible.
296296
return llvm::any_of(block->getSuccessorBlocks(), [&result](auto *block) {
297297
return result.getState(block) == State::Unavailable;
298298
});
299299
};
300-
if (!block->succ_empty() && !hasUnreachableSuccessor()) {
300+
if (!block->succ_empty() && !hasUnavailableSuccessor()) {
301301
continue;
302302
}
303-
assert(hasUnreachableSuccessor() ||
303+
assert(hasUnavailableSuccessor() ||
304304
isa<UnreachableInst>(block->getTerminator()));
305305
visit(block->getTerminator());
306306
}

0 commit comments

Comments
 (0)