From 196455416bbac96ee05be1c107b384cb84a7d2ba Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 3 Jul 2013 21:08:41 +0000 Subject: [PATCH] Check LongDoubleFormat instead of just Width as this is PowerPC specific. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185584 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclAttr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index e1fead3d4c..2aab22c9cf 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -3730,7 +3730,8 @@ static void handleModeAttr(Sema &S, Decl *D, const AttributeList &Attr) { NewTy = S.Context.LongDoubleTy; break; case 128: - if (!IntegerMode && S.Context.getTargetInfo().getLongDoubleWidth() != 128) { + if (!IntegerMode && &S.Context.getTargetInfo().getLongDoubleFormat() != + &llvm::APFloat::PPCDoubleDouble) { S.Diag(Attr.getLoc(), diag::err_unsupported_machine_mode) << Name; return; } -- 2.40.0