diff options
| author | Reid Kleckner <rnk@google.com> | 2018-11-01 19:32:04 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-11-01 19:32:04 +0000 |
| commit | bebc53f838c38fc2d3cd9e990fa0284497beae61 (patch) | |
| tree | e1889e3cdbcca29f633a28803b6ee387985f1c72 /llvm/lib | |
| parent | c8bd6ea35e459169cbd401372e81168ed8482536 (diff) | |
| download | bcm5719-llvm-bebc53f838c38fc2d3cd9e990fa0284497beae61.tar.gz bcm5719-llvm-bebc53f838c38fc2d3cd9e990fa0284497beae61.zip | |
Annotate possibly unintended fallthroughs in Hexagon MC code, NFC
Clang's -Wimplicit-fallthrough check fires on these switch cases. GCC
does not warn when a case body that ends in a switch falls through to a
case label of an outer switch.
It's not clear if these fall throughs are truly intended. The Hexagon
tests pass regardless of whether these case blocks fall through or
break.
For now, I have applied the intended fallthrough annotation macro with a
FIXME comment to unblock enabling the warning. I will send a follow-up
patch that converts them to breaks to the Hexagon maintainers.
llvm-svn: 345878
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp index c707dcb0316..bdb15584ffc 100644 --- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp +++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp @@ -127,6 +127,7 @@ unsigned HexagonMCInstrInfo::iClassOfDuplexPair(unsigned Ga, unsigned Gb) { case HexagonII::HSIG_A: return 0x4; } + LLVM_FALLTHROUGH; // FIXME: Intentional? case HexagonII::HSIG_L2: switch (Gb) { default: @@ -138,6 +139,7 @@ unsigned HexagonMCInstrInfo::iClassOfDuplexPair(unsigned Ga, unsigned Gb) { case HexagonII::HSIG_A: return 0x5; } + LLVM_FALLTHROUGH; // FIXME: Intentional? case HexagonII::HSIG_S1: switch (Gb) { default: @@ -151,6 +153,7 @@ unsigned HexagonMCInstrInfo::iClassOfDuplexPair(unsigned Ga, unsigned Gb) { case HexagonII::HSIG_A: return 0x6; } + LLVM_FALLTHROUGH; // FIXME: Intentional? case HexagonII::HSIG_S2: switch (Gb) { default: @@ -166,6 +169,7 @@ unsigned HexagonMCInstrInfo::iClassOfDuplexPair(unsigned Ga, unsigned Gb) { case HexagonII::HSIG_A: return 0x7; } + LLVM_FALLTHROUGH; // FIXME: Intentional? case HexagonII::HSIG_A: switch (Gb) { default: @@ -173,11 +177,13 @@ unsigned HexagonMCInstrInfo::iClassOfDuplexPair(unsigned Ga, unsigned Gb) { case HexagonII::HSIG_A: return 0x3; } + LLVM_FALLTHROUGH; // FIXME: Intentional? case HexagonII::HSIG_Compound: switch (Gb) { case HexagonII::HSIG_Compound: return 0xFFFFFFFF; } + break; } return 0xFFFFFFFF; } |

