From 841355c1e4e35fc02b5b171419979f5f9af0ebc8 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 23 Feb 2022 09:07:54 -0500 Subject: [PATCH] Remove unused function; NFC --- clang/include/clang/AST/ASTContext.h | 8 ------- clang/lib/AST/ASTContext.cpp | 35 ---------------------------- 2 files changed, 43 deletions(-) diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 510c63962053..f2d7060e6f3d 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -2758,14 +2758,6 @@ public: /// long double and double on AArch64 will return 0). int getFloatingTypeSemanticOrder(QualType LHS, QualType RHS) const; - /// Return a real floating point or a complex type (based on - /// \p typeDomain/\p typeSize). - /// - /// \param typeDomain a real floating point or complex type. - /// \param typeSize a real floating point or complex type. - QualType getFloatingTypeOfSizeWithinDomain(QualType typeSize, - QualType typeDomain) const; - unsigned getTargetAddressSpace(QualType T) const; unsigned getTargetAddressSpace(Qualifiers Q) const; diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index f29e90c05713..f99c2b91b923 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -6798,41 +6798,6 @@ static FloatingRank getFloatingRank(QualType T) { } } -/// getFloatingTypeOfSizeWithinDomain - Returns a real floating -/// point or a complex type (based on typeDomain/typeSize). -/// 'typeDomain' is a real floating point or complex type. -/// 'typeSize' is a real floating point or complex type. -QualType ASTContext::getFloatingTypeOfSizeWithinDomain(QualType Size, - QualType Domain) const { - FloatingRank EltRank = getFloatingRank(Size); - if (Domain->isComplexType()) { - switch (EltRank) { - case BFloat16Rank: llvm_unreachable("Complex bfloat16 is not supported"); - case Float16Rank: - case HalfRank: llvm_unreachable("Complex half is not supported"); - case Ibm128Rank: return getComplexType(Ibm128Ty); - case FloatRank: return getComplexType(FloatTy); - case DoubleRank: return getComplexType(DoubleTy); - case LongDoubleRank: return getComplexType(LongDoubleTy); - case Float128Rank: return getComplexType(Float128Ty); - } - } - - assert(Domain->isRealFloatingType() && "Unknown domain!"); - switch (EltRank) { - case Float16Rank: return HalfTy; - case BFloat16Rank: return BFloat16Ty; - case HalfRank: return HalfTy; - case FloatRank: return FloatTy; - case DoubleRank: return DoubleTy; - case LongDoubleRank: return LongDoubleTy; - case Float128Rank: return Float128Ty; - case Ibm128Rank: - return Ibm128Ty; - } - llvm_unreachable("getFloatingRank(): illegal value for rank"); -} - /// getFloatingTypeOrder - Compare the rank of the two specified floating /// point types, ignoring the domain of the type (i.e. 'double' == /// '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If