]> granicus.if.org Git - clang/commitdiff
Check LongDoubleFormat instead of just Width as this is PowerPC specific.
authorRoman Divacky <rdivacky@freebsd.org>
Wed, 3 Jul 2013 21:08:41 +0000 (21:08 +0000)
committerRoman Divacky <rdivacky@freebsd.org>
Wed, 3 Jul 2013 21:08:41 +0000 (21:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185584 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclAttr.cpp

index e1fead3d4c2fd5a23dcfab140e2ab555638f0903..2aab22c9cff8bc90fed2d2d27fd5051e6418b97e 100644 (file)
@@ -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;
     }