Improve diagnostics when getSizeInBits is called on the Other type.
authorChad Rosier <mcrosier@apple.com>
Mon, 24 Jun 2013 17:29:51 +0000 (17:29 +0000)
committerChad Rosier <mcrosier@apple.com>
Mon, 24 Jun 2013 17:29:51 +0000 (17:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184760 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/ValueTypes.h

index ec48b67b993c2c552b0b3e546d40d5744c265f9f..b7b3d73b3073e282f74d0d28d48b9eb996bd0e88 100644 (file)
@@ -343,6 +343,10 @@ namespace llvm {
 
     unsigned getSizeInBits() const {
       switch (SimpleTy) {
+      default:
+        llvm_unreachable("getSizeInBits called on extended MVT.");
+      case Other:
+        llvm_unreachable("Value type is non-standard value, Other.");
       case iPTR:
         llvm_unreachable("Value type size is target-dependent. Ask TLI.");
       case iPTRAny:
@@ -352,8 +356,6 @@ namespace llvm {
         llvm_unreachable("Value type is overloaded.");
       case Metadata:
         llvm_unreachable("Value type is metadata.");
-      default:
-        llvm_unreachable("getSizeInBits called on extended MVT.");
       case i1  :  return 1;
       case v2i1:  return 2;
       case v4i1:  return 4;