r189532 - Mode is now handled as a non-inheritable attribute, and CUDADevice & CUDAHost are now handled as inheritable attributes. In all three cases, this makes the processing behavior more consistent with the declared behavior in Attr.td.
Richard Smith
richard at metafoo.co.uk
Wed Aug 28 16:19:03 PDT 2013
Can you add test cases here (at least for the 'mode' attribute)?
On Wed, Aug 28, 2013 at 4:13 PM, Aaron Ballman <aaron at aaronballman.com>wrote:
> Author: aaronballman
> Date: Wed Aug 28 18:13:26 2013
> New Revision: 189532
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189532&view=rev
> Log:
> Mode is now handled as a non-inheritable attribute, and CUDADevice &
> CUDAHost are now handled as inheritable attributes. In all three cases,
> this makes the processing behavior more consistent with the declared
> behavior in Attr.td.
>
> 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=189532&r1=189531&r2=189532&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Aug 28 18:13:26 2013
> @@ -4678,9 +4678,8 @@ static void handleSelectAnyAttr(Sema &S,
> static void ProcessNonInheritableDeclAttr(Sema &S, Scope *scope, Decl *D,
> const AttributeList &Attr) {
> switch (Attr.getKind()) {
> - case AttributeList::AT_CUDADevice: handleDeviceAttr (S, D, Attr);
> break;
> - case AttributeList::AT_CUDAHost: handleHostAttr (S, D, Attr);
> break;
> case AttributeList::AT_Overloadable:handleOverloadableAttr(S, D, Attr);
> break;
> + case AttributeList::AT_Mode: handleModeAttr (S, D, Attr);
> break;
> default:
> break;
> }
> @@ -4705,8 +4704,7 @@ static void ProcessInheritableDeclAttr(S
> // Ignore these, these are type attributes, handled by
> // ProcessTypeAttributes.
> break;
> - case AttributeList::AT_CUDADevice:
> - case AttributeList::AT_CUDAHost:
> + case AttributeList::AT_Mode:
> case AttributeList::AT_Overloadable:
> // Ignore, this is a non-inheritable attribute, handled
> // by ProcessNonInheritableDeclAttr.
> @@ -4743,11 +4741,12 @@ static void ProcessInheritableDeclAttr(S
> case AttributeList::AT_Format: handleFormatAttr (S, D, Attr);
> break;
> case AttributeList::AT_FormatArg: handleFormatArgAttr (S, D, Attr);
> break;
> case AttributeList::AT_CUDAGlobal: handleGlobalAttr (S, D, Attr);
> break;
> + case AttributeList::AT_CUDADevice: handleDeviceAttr (S, D, Attr);
> break;
> + case AttributeList::AT_CUDAHost: handleHostAttr (S, D, Attr);
> break;
> case AttributeList::AT_GNUInline: handleGNUInlineAttr (S, D, Attr);
> break;
> case AttributeList::AT_CUDALaunchBounds:
> handleLaunchBoundsAttr(S, D, Attr);
> break;
> - case AttributeList::AT_Mode: handleModeAttr (S, D, Attr);
> break;
> case AttributeList::AT_Malloc: handleMallocAttr (S, D, Attr);
> break;
> case AttributeList::AT_MayAlias: handleMayAliasAttr (S, D, Attr);
> break;
> case AttributeList::AT_NoCommon: handleNoCommonAttr (S, D, Attr);
> break;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130828/f9d7b437/attachment.html>
More information about the cfe-commits
mailing list