[PATCH] D53991: [Hexagon] Remove unintended fallthrough from MC duplex code

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 12:41:20 PDT 2018


rnk created this revision.
rnk added a reviewer: kparzysz.
Herald added a subscriber: hiraditya.

I recently added these fall through annotations, but it's not clear if
the code is intended to fall through. In this patch, I changed them to
breaks, which seems more likely to be correct. If so, please approve
this patch and I will commit it. If not, I will reupload this patch to
remove the FIXME comments from the annotations.


https://reviews.llvm.org/D53991

Files:
  llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp


Index: llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
===================================================================
--- llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
+++ llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
@@ -127,7 +127,7 @@
     case HexagonII::HSIG_A:
       return 0x4;
     }
-    LLVM_FALLTHROUGH; // FIXME: Intentional?
+    break;
   case HexagonII::HSIG_L2:
     switch (Gb) {
     default:
@@ -139,7 +139,7 @@
     case HexagonII::HSIG_A:
       return 0x5;
     }
-    LLVM_FALLTHROUGH; // FIXME: Intentional?
+    break;
   case HexagonII::HSIG_S1:
     switch (Gb) {
     default:
@@ -153,7 +153,7 @@
     case HexagonII::HSIG_A:
       return 0x6;
     }
-    LLVM_FALLTHROUGH; // FIXME: Intentional?
+    break;
   case HexagonII::HSIG_S2:
     switch (Gb) {
     default:
@@ -169,15 +169,15 @@
     case HexagonII::HSIG_A:
       return 0x7;
     }
-    LLVM_FALLTHROUGH; // FIXME: Intentional?
+    break;
   case HexagonII::HSIG_A:
     switch (Gb) {
     default:
       break;
     case HexagonII::HSIG_A:
       return 0x3;
     }
-    LLVM_FALLTHROUGH; // FIXME: Intentional?
+    break;
   case HexagonII::HSIG_Compound:
     switch (Gb) {
     case HexagonII::HSIG_Compound:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53991.172204.patch
Type: text/x-patch
Size: 1259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/d7928f08/attachment.bin>


More information about the llvm-commits mailing list