[llvm] 34e3007 - [ARM] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 10:51:59 PDT 2024


Author: Kazu Hirata
Date: 2024-09-09T10:51:53-07:00
New Revision: 34e3007c69eb91c16f23f20548305a2fb8feb75e

URL: https://github.com/llvm/llvm-project/commit/34e3007c69eb91c16f23f20548305a2fb8feb75e
DIFF: https://github.com/llvm/llvm-project/commit/34e3007c69eb91c16f23f20548305a2fb8feb75e.diff

LOG: [ARM] Fix a warning

This patch fixes:

  llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h:214:5: error: default
  label in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]

Added: 
    

Modified: 
    llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h b/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
index 88526ba991bec0..35c2d6c5dea153 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
@@ -211,7 +211,6 @@ namespace ARMII {
 
   inline static const char *AddrModeToString(AddrMode addrmode) {
     switch (addrmode) {
-    default: llvm_unreachable("Unknown addressing mode");
     case AddrModeNone:     return "AddrModeNone";
     case AddrMode1:        return "AddrMode1";
     case AddrMode2:        return "AddrMode2";


        


More information about the llvm-commits mailing list