[llvm] 636269f - [CodeGen] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 11:00:59 PDT 2023


Author: Kazu Hirata
Date: 2023-08-25T11:00:52-07:00
New Revision: 636269f4fca44693bfd787b0a37bb0328ffcc085

URL: https://github.com/llvm/llvm-project/commit/636269f4fca44693bfd787b0a37bb0328ffcc085
DIFF: https://github.com/llvm/llvm-project/commit/636269f4fca44693bfd787b0a37bb0328ffcc085.diff

LOG: [CodeGen] Fix a warning

This patch fixes:

  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:3540:9: error: default
  label in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]

Added: 
    

Modified: 
    llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 7823815e3595ad..1456073bd64617 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -3537,8 +3537,6 @@ void CodeViewDebug::collectDebugInfoForJumpTables(const MachineFunction *MF,
           std::tie(Base, BaseOffset, Branch, EntrySize) =
               Asm->getCodeViewJumpTableInfo(JumpTableIndex, &BranchMI, Branch);
           break;
-        default:
-          llvm_unreachable("Unknown JumpTableEntryKind");
         }
 
         CurFn->JumpTables.push_back(


        


More information about the llvm-commits mailing list