aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/ValueTypes.h
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-06-24 17:29:51 +0000
committerChad Rosier <mcrosier@apple.com>2013-06-24 17:29:51 +0000
commite701431466d7cff6735c16f0c540ecbaf3ffd6ea (patch)
tree33ec6e1704c029e74d19a1fbd4a0ddb177c96c31 /include/llvm/CodeGen/ValueTypes.h
parentcf1a3b16c00cef30207e6b83d046ad38752dfefb (diff)
downloadexternal_llvm-e701431466d7cff6735c16f0c540ecbaf3ffd6ea.zip
external_llvm-e701431466d7cff6735c16f0c540ecbaf3ffd6ea.tar.gz
external_llvm-e701431466d7cff6735c16f0c540ecbaf3ffd6ea.tar.bz2
Improve diagnostics when getSizeInBits is called on the Other type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ValueTypes.h')
-rw-r--r--include/llvm/CodeGen/ValueTypes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index ec48b67..b7b3d73 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -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;