[llvm] r303571 - [DataLayout] Add llvm_unreachable to the default of a nested switch statement that covers all values given to it by the outer switch. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 12:28:36 PDT 2017


Author: ctopper
Date: Mon May 22 14:28:36 2017
New Revision: 303571

URL: http://llvm.org/viewvc/llvm-project?rev=303571&view=rev
Log:
[DataLayout] Add llvm_unreachable to the default of a nested switch statement that covers all values given to it by the outer switch. NFC

Modified:
    llvm/trunk/lib/IR/DataLayout.cpp

Modified: llvm/trunk/lib/IR/DataLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=303571&r1=303570&r2=303571&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DataLayout.cpp (original)
+++ llvm/trunk/lib/IR/DataLayout.cpp Mon May 22 14:28:36 2017
@@ -307,7 +307,7 @@ void DataLayout::parseSpecifier(StringRe
     case 'a': {
       AlignTypeEnum AlignType;
       switch (Specifier) {
-      default:
+      default: llvm_unreachable("Unexpected specifier!");
       case 'i': AlignType = INTEGER_ALIGN; break;
       case 'v': AlignType = VECTOR_ALIGN; break;
       case 'f': AlignType = FLOAT_ALIGN; break;




More information about the llvm-commits mailing list