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

David Blaikie dblaikie at gmail.com
Thu Jul 4 09:50:55 PDT 2013


On Wed, Jul 3, 2013 at 2:08 PM, Roman Divacky <rdivacky at freebsd.org> wrote:
> 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.

Test case?

>
> 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;
>      }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list