aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-04 16:19:44 +0000
committerDan Gohman <gohman@apple.com>2008-11-04 16:19:44 +0000
commit9a99325141ca9c67165bbdabbc5a854a5c679a23 (patch)
tree4a1ae9c14863495e8cf6fa8366df8430a760ba94 /lib/VMCore
parent1f5d212ca720b4e82c14c79c4a96b6ccc4fc3307 (diff)
downloadexternal_llvm-9a99325141ca9c67165bbdabbc5a854a5c679a23.zip
external_llvm-9a99325141ca9c67165bbdabbc5a854a5c679a23.tar.gz
external_llvm-9a99325141ca9c67165bbdabbc5a854a5c679a23.tar.bz2
Duncan pointed out that the Extended case in getTypeForMVT could
be considerably simplified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/ValueTypes.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp
index 22449f9..0229f15 100644
--- a/lib/VMCore/ValueTypes.cpp
+++ b/lib/VMCore/ValueTypes.cpp
@@ -121,13 +121,8 @@ std::string MVT::getMVTString() const {
const Type *MVT::getTypeForMVT() const {
switch (V) {
default:
- if (isVector())
- return VectorType::get(getVectorElementType().getTypeForMVT(),
- getVectorNumElements());
- if (isInteger())
- return IntegerType::get(getSizeInBits());
- assert(0 && "MVT does not correspond to LLVM type!");
- return Type::VoidTy;
+ assert(isExtended() && "Type is not extended!");
+ return LLVMTy;
case MVT::isVoid: return Type::VoidTy;
case MVT::i1: return Type::Int1Ty;
case MVT::i8: return Type::Int8Ty;