Skip to content

Commit a088c61

Browse files
committed
[SPIRV] Fix -Wunused-but-set-variable after #92531
1 parent 3e228c8 commit a088c61

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
6363
return output;
6464
}
6565

66-
if (auto *RI = dyn_cast<ReturnInst>(T))
67-
return output;
68-
69-
assert(false && "Unhandled terminator type.");
66+
assert(isa<ReturnInst>(T) && "Unhandled terminator type.");
7067
return output;
7168
}
7269

@@ -76,7 +73,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
7673
BasicBlock *BB,
7774
const std::unordered_map<BasicBlock *, ConstantInt *> &TargetToValue) {
7875
auto *T = BB->getTerminator();
79-
if (auto *RI = dyn_cast<ReturnInst>(T))
76+
if (isa<ReturnInst>(T))
8077
return nullptr;
8178

8279
IRBuilder<> Builder(BB);

0 commit comments

Comments
 (0)