[llvm] r345876 - Remove unnecessary fallthrough annotation after unreachable

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 12:11:05 PDT 2018


Author: rnk
Date: Thu Nov  1 12:11:05 2018
New Revision: 345876

URL: http://llvm.org/viewvc/llvm-project?rev=345876&view=rev
Log:
Remove unnecessary fallthrough annotation after unreachable

Clang's -Wimplicit-fallthrough implementation warns on this. I built
clang with GCC 7.3 in +asserts and -asserts mode, and GCC doesn't warn
on this in either configuration. I think it is unnecessary. I separated
it from the large mechanical patch (https://reviews.llvm.org/D53950) in
case I am wrong and it has to be reverted.

Modified:
    llvm/trunk/lib/Transforms/Utils/FunctionComparator.cpp

Modified: llvm/trunk/lib/Transforms/Utils/FunctionComparator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/FunctionComparator.cpp?rev=345876&r1=345875&r2=345876&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/FunctionComparator.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/FunctionComparator.cpp Thu Nov  1 12:11:05 2018
@@ -410,8 +410,6 @@ int FunctionComparator::cmpTypes(Type *T
   switch (TyL->getTypeID()) {
   default:
     llvm_unreachable("Unknown type!");
-    // Fall through in Release mode.
-    LLVM_FALLTHROUGH;
   case Type::IntegerTyID:
     return cmpNumbers(cast<IntegerType>(TyL)->getBitWidth(),
                       cast<IntegerType>(TyR)->getBitWidth());




More information about the llvm-commits mailing list