r185584 - Check LongDoubleFormat instead of just Width as this is PowerPC specific.

Roman Divacky rdivacky at freebsd.org
Wed Jul 3 14:08:41 PDT 2013


Author: rdivacky
Date: Wed Jul  3 16:08:41 2013
New Revision: 185584

URL: http://llvm.org/viewvc/llvm-project?rev=185584&view=rev
Log:
Check LongDoubleFormat instead of just Width as this is PowerPC specific.

Modified:
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=185584&r1=185583&r2=185584&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Jul  3 16:08:41 2013
@@ -3730,7 +3730,8 @@ static void handleModeAttr(Sema &S, Decl
     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;
     }





More information about the cfe-commits mailing list