[clang] 841355c - Remove unused function; NFC
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 23 06:08:35 PST 2022
Author: Aaron Ballman
Date: 2022-02-23T09:08:27-05:00
New Revision: 841355c1e4e35fc02b5b171419979f5f9af0ebc8
URL: https://github.com/llvm/llvm-project/commit/841355c1e4e35fc02b5b171419979f5f9af0ebc8
DIFF: https://github.com/llvm/llvm-project/commit/841355c1e4e35fc02b5b171419979f5f9af0ebc8.diff
LOG: Remove unused function; NFC
Added:
Modified:
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 510c63962053b..f2d7060e6f3d3 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -2758,14 +2758,6 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// 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 f29e90c05713c..f99c2b91b9232 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
More information about the cfe-commits
mailing list