r293867 - CodeGen: add a LLVM_FALLTHROUGH to a fallthrough (NFC)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 1 21:45:44 PST 2017


Author: compnerd
Date: Wed Feb  1 23:45:43 2017
New Revision: 293867

URL: http://llvm.org/viewvc/llvm-project?rev=293867&view=rev
Log:
CodeGen: add a LLVM_FALLTHROUGH to a fallthrough (NFC)

Drive by cleanup noticed while investigating an IR verifier assertion.

Modified:
    cfe/trunk/lib/CodeGen/CGClass.cpp

Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=293867&r1=293866&r2=293867&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Wed Feb  1 23:45:43 2017
@@ -1416,9 +1416,7 @@ void CodeGenFunction::EmitDestructorBody
   // we'd introduce *two* handler blocks.  In the Microsoft ABI, we
   // always delegate because we might not have a definition in this TU.
   switch (DtorType) {
-  case Dtor_Comdat:
-    llvm_unreachable("not expecting a COMDAT");
-
+  case Dtor_Comdat: llvm_unreachable("not expecting a COMDAT");
   case Dtor_Deleting: llvm_unreachable("already handled deleting case");
 
   case Dtor_Complete:
@@ -1433,7 +1431,9 @@ void CodeGenFunction::EmitDestructorBody
                             /*Delegating=*/false, LoadCXXThisAddress());
       break;
     }
+
     // Fallthrough: act like we're in the base variant.
+    LLVM_FALLTHROUGH;
 
   case Dtor_Base:
     assert(Body);




More information about the cfe-commits mailing list