]> granicus.if.org Git - clang/commitdiff
Add LLVM_FALLTHROUGH annotation after switch
authorReid Kleckner <rnk@google.com>
Thu, 1 Nov 2018 18:53:02 +0000 (18:53 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 1 Nov 2018 18:53:02 +0000 (18:53 +0000)
This silences a -Wimplicit-fallthrough warning from clang. GCC does not
appear to warn when the case body ends in a switch.

This is a somewhat surprising but intended fallthrough that I pulled out
from my mechanical patch. The code intends to handle 'Yi' and related
constraints as the 'x' constraint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345873 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets/X86.cpp

index 467eb55f44c71e4bab0f0c43d18d04db15bd655c..c7f84e5266fdf292806443c439916aa4e8c2835e 100644 (file)
@@ -1681,6 +1681,7 @@ bool X86TargetInfo::validateOperandSize(StringRef Constraint,
         return false;
       break;
     }
+    LLVM_FALLTHROUGH;
   case 'v':
   case 'x':
     if (SSELevel >= AVX512F)