[PATCH] D61844: ARMDefines.h: fix -Wimplicit-fallthrough in -DLLVM_ENABLE_ASSERTIONS=OFF builds

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 21:09:08 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL360646: ARMDefines.h: fix -Wimplicit-fallthrough in -DLLVM_ENABLE_ASSERTIONS=OFF builds (authored by MaskRay, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61844/new/

https://reviews.llvm.org/D61844

Files:
  lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h


Index: lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h
+++ lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h
@@ -9,6 +9,8 @@
 #ifndef lldb_ARMDefines_h_
 #define lldb_ARMDefines_h_
 
+#include "llvm/Support/ErrorHandling.h"
+
 #include <cassert>
 #include <cstdint>
 
@@ -68,8 +70,6 @@
 
 static inline const char *ARMCondCodeToString(uint32_t CC) {
   switch (CC) {
-  default:
-    assert(0 && "Unknown condition code");
   case COND_EQ:
     return "eq";
   case COND_NE:
@@ -101,6 +101,7 @@
   case COND_AL:
     return "al";
   }
+  llvm_unreachable("Unknown condition code");
 }
 
 static inline bool ARMConditionPassed(const uint32_t condition,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61844.199365.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190514/b012fce2/attachment.bin>


More information about the llvm-commits mailing list