From ac6f5f40158b3491e8841adb1e6d2f2a2b071594 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. llvm-svn: 185584 --- clang/lib/Sema/SemaDeclAttr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index e1fead3..2aab22c 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/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.7.4