Skip to content

Commit c8f2ee7

Browse files
committed
Fix a warning in #98362 [-Wunused-but-set-variable]
1 parent aee553e commit c8f2ee7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/IPO/Attributor.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,10 +2554,9 @@ ChangeStatus Attributor::cleanupIR() {
25542554

25552555
for (const auto &V : ToBeDeletedInsts) {
25562556
if (Instruction *I = dyn_cast_or_null<Instruction>(V)) {
2557-
if (auto *CB = dyn_cast<CallBase>(I)) {
2558-
assert((isa<IntrinsicInst>(CB) || isRunOn(*I->getFunction())) &&
2559-
"Cannot delete an instruction outside the current SCC!");
2560-
}
2557+
assert((!isa<CallBase>(I) || isa<IntrinsicInst>(I) ||
2558+
isRunOn(*I->getFunction())) &&
2559+
"Cannot delete an instruction outside the current SCC!");
25612560
I->dropDroppableUses();
25622561
CGModifiedFunctions.insert(I->getFunction());
25632562
if (!I->getType()->isVoidTy())

0 commit comments

Comments
 (0)