[llvm] f42025c - [SPIRV] Fix -Wunused-but-set-variable. NFC
    Fangrui Song via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jun  6 17:51:36 PDT 2024
    
    
  
Author: Fangrui Song
Date: 2024-06-06T17:51:32-07:00
New Revision: f42025c2178b30894df657af6aa92e45c7cc0dbc
URL: https://github.com/llvm/llvm-project/commit/f42025c2178b30894df657af6aa92e45c7cc0dbc
DIFF: https://github.com/llvm/llvm-project/commit/f42025c2178b30894df657af6aa92e45c7cc0dbc.diff
LOG: [SPIRV] Fix -Wunused-but-set-variable. NFC
Added: 
    
Modified: 
    llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp b/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
index 4b0e7c421df3e..2744c25d1bc75 100644
--- a/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
@@ -106,7 +106,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
                             const std::unordered_set<BasicBlock *> ToReplace,
                             BasicBlock *NewTarget) {
     auto *T = BB->getTerminator();
-    if (auto *RI = dyn_cast<ReturnInst>(T))
+    if (isa<ReturnInst>(T))
       return;
 
     if (auto *BI = dyn_cast<BranchInst>(T)) {
        
    
    
More information about the llvm-commits
mailing list