[Gardening] Fix some set but not used variables

This commit is contained in:
Anthony Latsis
2025-01-19 23:11:51 +00:00
parent 71015c674b
commit a84dfc8387
89 changed files with 169 additions and 181 deletions

View File

@@ -527,7 +527,8 @@ void MoveOnlyObjectCheckerPImpl::check(
// (%yield, ..., %handle) = begin_apply
// %copy = copy_value %yield
// %mark = mark_unresolved_noncopyable_value [no_consume_or_assign] %copy
if (auto bai = dyn_cast_or_null<BeginApplyInst>(i->getOperand(0)->getDefiningInstruction())) {
if (isa_and_nonnull<BeginApplyInst>(
i->getOperand(0)->getDefiningInstruction())) {
if (i->getOperand(0)->getOwnershipKind() == OwnershipKind::Guaranteed) {
for (auto *use : markedInst->getConsumingUses()) {
destroys.push_back(cast<DestroyValueInst>(use->getUser()));