|
@@ -58,7 +58,7 @@ unsigned ASTContext::NumImplicitDestructors;
|
|
|
unsigned ASTContext::NumImplicitDestructorsDeclared;
|
|
|
|
|
|
enum FloatingRank {
|
|
|
- HalfRank, FloatRank, DoubleRank, LongDoubleRank, Float128Rank
|
|
|
+ HalfRank, FloatRank, DoubleRank, LongDoubleRank
|
|
|
};
|
|
|
|
|
|
RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
|
|
@@ -967,6 +967,14 @@ TypedefDecl *ASTContext::getUInt128Decl() const {
|
|
|
return UInt128Decl;
|
|
|
}
|
|
|
|
|
|
+TypeDecl *ASTContext::getFloat128StubType() const {
|
|
|
+ assert(LangOpts.CPlusPlus && "should only be called for c++");
|
|
|
+ if (!Float128StubDecl)
|
|
|
+ Float128StubDecl = buildImplicitRecord("__float128");
|
|
|
+
|
|
|
+ return Float128StubDecl;
|
|
|
+}
|
|
|
+
|
|
|
void ASTContext::InitBuiltinType(CanQualType &R, BuiltinType::Kind K) {
|
|
|
BuiltinType *Ty = new (*this, TypeAlignment) BuiltinType(K);
|
|
|
R = CanQualType::CreateUnsafe(QualType(Ty, 0));
|
|
@@ -1015,9 +1023,6 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
|
|
|
InitBuiltinType(DoubleTy, BuiltinType::Double);
|
|
|
InitBuiltinType(LongDoubleTy, BuiltinType::LongDouble);
|
|
|
|
|
|
- // GNU extension, __float128 for IEEE quadruple precision
|
|
|
- InitBuiltinType(Float128Ty, BuiltinType::Float128);
|
|
|
-
|
|
|
// GNU extension, 128-bit integers.
|
|
|
InitBuiltinType(Int128Ty, BuiltinType::Int128);
|
|
|
InitBuiltinType(UnsignedInt128Ty, BuiltinType::UInt128);
|
|
@@ -1079,7 +1084,6 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
|
|
|
FloatComplexTy = getComplexType(FloatTy);
|
|
|
DoubleComplexTy = getComplexType(DoubleTy);
|
|
|
LongDoubleComplexTy = getComplexType(LongDoubleTy);
|
|
|
- Float128ComplexTy = getComplexType(Float128Ty);
|
|
|
|
|
|
// Builtin types for 'id', 'Class', and 'SEL'.
|
|
|
InitBuiltinType(ObjCBuiltinIdTy, BuiltinType::ObjCId);
|
|
@@ -1337,7 +1341,6 @@ const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const {
|
|
|
case BuiltinType::Float: return Target->getFloatFormat();
|
|
|
case BuiltinType::Double: return Target->getDoubleFormat();
|
|
|
case BuiltinType::LongDouble: return Target->getLongDoubleFormat();
|
|
|
- case BuiltinType::Float128: return Target->getFloat128Format();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1648,10 +1651,6 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
|
|
|
Width = Target->getLongDoubleWidth();
|
|
|
Align = Target->getLongDoubleAlign();
|
|
|
break;
|
|
|
- case BuiltinType::Float128:
|
|
|
- Width = Target->getFloat128Width();
|
|
|
- Align = Target->getFloat128Align();
|
|
|
- break;
|
|
|
case BuiltinType::NullPtr:
|
|
|
Width = Target->getPointerWidth(0); // C++ 3.9.1p11: sizeof(nullptr_t)
|
|
|
Align = Target->getPointerAlign(0); // == sizeof(void*)
|
|
@@ -4636,7 +4635,6 @@ static FloatingRank getFloatingRank(QualType T) {
|
|
|
case BuiltinType::Float: return FloatRank;
|
|
|
case BuiltinType::Double: return DoubleRank;
|
|
|
case BuiltinType::LongDouble: return LongDoubleRank;
|
|
|
- case BuiltinType::Float128: return Float128Rank;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4653,7 +4651,6 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain(QualType Size,
|
|
|
case FloatRank: return FloatComplexTy;
|
|
|
case DoubleRank: return DoubleComplexTy;
|
|
|
case LongDoubleRank: return LongDoubleComplexTy;
|
|
|
- case Float128Rank: return Float128ComplexTy;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4663,7 +4660,6 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain(QualType Size,
|
|
|
case FloatRank: return FloatTy;
|
|
|
case DoubleRank: return DoubleTy;
|
|
|
case LongDoubleRank: return LongDoubleTy;
|
|
|
- case Float128Rank: return Float128Ty;
|
|
|
}
|
|
|
llvm_unreachable("getFloatingRank(): illegal value for rank");
|
|
|
}
|
|
@@ -5493,7 +5489,6 @@ static char getObjCEncodingForPrimitiveKind(const ASTContext *C,
|
|
|
case BuiltinType::LongDouble: return 'D';
|
|
|
case BuiltinType::NullPtr: return '*'; // like char*
|
|
|
|
|
|
- case BuiltinType::Float128:
|
|
|
case BuiltinType::Half:
|
|
|
// FIXME: potentially need @encodes for these!
|
|
|
return ' ';
|
|
@@ -8684,8 +8679,6 @@ QualType ASTContext::getRealTypeForBitwidth(unsigned DestWidth) const {
|
|
|
return DoubleTy;
|
|
|
case TargetInfo::LongDouble:
|
|
|
return LongDoubleTy;
|
|
|
- case TargetInfo::Float128:
|
|
|
- return Float128Ty;
|
|
|
case TargetInfo::NoFloat:
|
|
|
return QualType();
|
|
|
}
|