]> granicus.if.org Git - clang/commitdiff
Remove switch/case statements and call GetFloatingPointTy() instead to get the
authorAkira Hatanaka <ahatanaka@mips.com>
Tue, 10 Jan 2012 23:30:49 +0000 (23:30 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Tue, 10 Jan 2012 23:30:49 +0000 (23:30 +0000)
floating point type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147894 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp

index 128bb44bb572c95ec45ea850bb2e0ea2f8c69512..4693fcb7e26172530f2f2be4bb45109432c12e32 100644 (file)
@@ -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)