summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/ValueTypes.h
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-02-05 22:14:15 +0000
committerCraig Topper <craig.topper@gmail.com>2012-02-05 22:14:15 +0000
commit50bee42b54cd9aec5f49566307df2b0cf23afcf6 (patch)
treecaa20b5d1a706f63057cf77fd42f4c6126050746 /include/llvm/CodeGen/ValueTypes.h
parent2cb395eae71dacda49ca3fe758618fc3e0701659 (diff)
downloadllvm-50bee42b54cd9aec5f49566307df2b0cf23afcf6.tar.gz
llvm-50bee42b54cd9aec5f49566307df2b0cf23afcf6.tar.bz2
llvm-50bee42b54cd9aec5f49566307df2b0cf23afcf6.tar.xz
Convert assert(0) to llvm_unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ValueTypes.h')
-rw-r--r--include/llvm/CodeGen/ValueTypes.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index eb0793ed25..d163403145 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -16,10 +16,11 @@
#ifndef LLVM_CODEGEN_VALUETYPES_H
#define LLVM_CODEGEN_VALUETYPES_H
-#include <cassert>
-#include <string>
#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
+#include <cassert>
+#include <string>
namespace llvm {
class Type;
@@ -246,13 +247,13 @@ namespace llvm {
unsigned getSizeInBits() const {
switch (SimpleTy) {
case iPTR:
- assert(0 && "Value type size is target-dependent. Ask TLI.");
+ llvm_unreachable("Value type size is target-dependent. Ask TLI.");
case iPTRAny:
case iAny:
case fAny:
- assert(0 && "Value type is overloaded.");
+ llvm_unreachable("Value type is overloaded.");
default:
- assert(0 && "getSizeInBits called on extended MVT.");
+ llvm_unreachable("getSizeInBits called on extended MVT.");
case i1 : return 1;
case i8 : return 8;
case i16 :
@@ -306,7 +307,7 @@ namespace llvm {
static MVT getFloatingPointVT(unsigned BitWidth) {
switch (BitWidth) {
default:
- assert(false && "Bad bit width!");
+ llvm_unreachable("Bad bit width!");
case 16:
return MVT::f16;
case 32: