@@ -58,7 +58,7 @@ unsigned ASTContext::NumImplicitDestructors;
58
58
unsigned ASTContext::NumImplicitDestructorsDeclared;
59
59
60
60
enum FloatingRank {
61
- HalfRank, FloatRank, DoubleRank, LongDoubleRank, Float128Rank
61
+ HalfRank, FloatRank, DoubleRank, LongDoubleRank
62
62
};
63
63
64
64
RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
@@ -967,6 +967,14 @@ TypedefDecl *ASTContext::getUInt128Decl() const {
967
967
return UInt128Decl;
968
968
}
969
969
970
+ TypeDecl *ASTContext::getFloat128StubType() const {
971
+ assert(LangOpts.CPlusPlus && "should only be called for c++");
972
+ if (!Float128StubDecl)
973
+ Float128StubDecl = buildImplicitRecord("__float128");
974
+
975
+ return Float128StubDecl;
976
+ }
977
+
970
978
void ASTContext::InitBuiltinType(CanQualType &R, BuiltinType::Kind K) {
971
979
BuiltinType *Ty = new (*this, TypeAlignment) BuiltinType(K);
972
980
R = CanQualType::CreateUnsafe(QualType(Ty, 0));
@@ -1015,9 +1023,6 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
1015
1023
InitBuiltinType(DoubleTy, BuiltinType::Double);
1016
1024
InitBuiltinType(LongDoubleTy, BuiltinType::LongDouble);
1017
1025
1018
- // GNU extension, __float128 for IEEE quadruple precision
1019
- InitBuiltinType(Float128Ty, BuiltinType::Float128);
1020
-
1021
1026
// GNU extension, 128-bit integers.
1022
1027
InitBuiltinType(Int128Ty, BuiltinType::Int128);
1023
1028
InitBuiltinType(UnsignedInt128Ty, BuiltinType::UInt128);
@@ -1079,7 +1084,6 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
1079
1084
FloatComplexTy = getComplexType(FloatTy);
1080
1085
DoubleComplexTy = getComplexType(DoubleTy);
1081
1086
LongDoubleComplexTy = getComplexType(LongDoubleTy);
1082
- Float128ComplexTy = getComplexType(Float128Ty);
1083
1087
1084
1088
// Builtin types for 'id', 'Class', and 'SEL'.
1085
1089
InitBuiltinType(ObjCBuiltinIdTy, BuiltinType::ObjCId);
@@ -1337,7 +1341,6 @@ const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const {
1337
1341
case BuiltinType::Float: return Target->getFloatFormat();
1338
1342
case BuiltinType::Double: return Target->getDoubleFormat();
1339
1343
case BuiltinType::LongDouble: return Target->getLongDoubleFormat();
1340
- case BuiltinType::Float128: return Target->getFloat128Format();
1341
1344
}
1342
1345
}
1343
1346
@@ -1648,10 +1651,6 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
1648
1651
Width = Target->getLongDoubleWidth();
1649
1652
Align = Target->getLongDoubleAlign();
1650
1653
break;
1651
- case BuiltinType::Float128:
1652
- Width = Target->getFloat128Width();
1653
- Align = Target->getFloat128Align();
1654
- break;
1655
1654
case BuiltinType::NullPtr:
1656
1655
Width = Target->getPointerWidth(0); // C++ 3.9.1p11: sizeof(nullptr_t)
1657
1656
Align = Target->getPointerAlign(0); // == sizeof(void*)
@@ -4636,7 +4635,6 @@ static FloatingRank getFloatingRank(QualType T) {
4636
4635
case BuiltinType::Float: return FloatRank;
4637
4636
case BuiltinType::Double: return DoubleRank;
4638
4637
case BuiltinType::LongDouble: return LongDoubleRank;
4639
- case BuiltinType::Float128: return Float128Rank;
4640
4638
}
4641
4639
}
4642
4640
@@ -4653,7 +4651,6 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain(QualType Size,
4653
4651
case FloatRank: return FloatComplexTy;
4654
4652
case DoubleRank: return DoubleComplexTy;
4655
4653
case LongDoubleRank: return LongDoubleComplexTy;
4656
- case Float128Rank: return Float128ComplexTy;
4657
4654
}
4658
4655
}
4659
4656
@@ -4663,7 +4660,6 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain(QualType Size,
4663
4660
case FloatRank: return FloatTy;
4664
4661
case DoubleRank: return DoubleTy;
4665
4662
case LongDoubleRank: return LongDoubleTy;
4666
- case Float128Rank: return Float128Ty;
4667
4663
}
4668
4664
llvm_unreachable("getFloatingRank(): illegal value for rank");
4669
4665
}
@@ -5493,7 +5489,6 @@ static char getObjCEncodingForPrimitiveKind(const ASTContext *C,
5493
5489
case BuiltinType::LongDouble: return 'D';
5494
5490
case BuiltinType::NullPtr: return '*'; // like char*
5495
5491
5496
- case BuiltinType::Float128:
5497
5492
case BuiltinType::Half:
5498
5493
// FIXME: potentially need @encodes for these!
5499
5494
return ' ';
@@ -8684,8 +8679,6 @@ QualType ASTContext::getRealTypeForBitwidth(unsigned DestWidth) const {
8684
8679
return DoubleTy;
8685
8680
case TargetInfo::LongDouble:
8686
8681
return LongDoubleTy;
8687
- case TargetInfo::Float128:
8688
- return Float128Ty;
8689
8682
case TargetInfo::NoFloat:
8690
8683
return QualType();
8691
8684
}
0 commit comments