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)
llvm-svn: 185584

clang/lib/Sema/SemaDeclAttr.cpp

index e1fead3..2aab22c 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;
     }