From 9db0a5e7e360d8048c83ee1c46a88c4172182791 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 10 Jan 2012 23:30:49 +0000 Subject: [PATCH] Remove switch/case statements and call GetFloatingPointTy() instead to get the floating point type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147894 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TargetInfo.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 128bb44bb5..4693fcb7e2 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/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) -- 2.40.0