From ee65b744e8e7a4a53e06d0ea7d2bb7246e2b0eb5 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 10 Jan 2012 23:30:49 +0000 Subject: Remove switch/case statements and call GetFloatingPointTy() instead to get the floating point type. llvm-svn: 147894 --- clang/lib/CodeGen/TargetInfo.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 128bb44bb57..4693fcb7e26 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -3225,19 +3225,7 @@ MipsABIInfo::returnAggregateInRegs(QualType RetTy, uint64_t Size) const { if (!BT || !BT->isFloatingPoint()) break; - switch (BT->getKind()) { - case BuiltinType::Float: - RTList.push_back(llvm::Type::getFloatTy(getVMContext())); - break; - case BuiltinType::Double: - RTList.push_back(llvm::Type::getDoubleTy(getVMContext())); - break; - case BuiltinType::LongDouble: - RTList.push_back(llvm::Type::getFP128Ty(getVMContext())); - break; - default: - assert(false && "Unexpexted floating point type."); - } + RTList.push_back(GetFloatingPointTy(BT)); } if (i == e) -- cgit v1.2.3