r272342 - RenderScript support in the Frontend

Pirama Arumuga Nainar via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 13:54:34 PDT 2016


Uploaded http://reviews.llvm.org/D21240 with the requested changes.

On Fri, Jun 10, 2016 at 7:39 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:

> > +def Kernel : Attr {
>
> Please rename this to RenderScriptKernel. We have another attribute
> that is spelled "kernel" already, and we want to distinguish between
> them to reduce confusion.
>

Addressed in the above patch.

>
> > +  let Spellings = [GNU<"kernel">];
>
> Is there a reason this isn't also spelled with a C++ attribute spelling?


RenderScript is a C99 variant and the C++ spelling is not needed/supported.


>
>
> +static void handleKernelAttr(Sema &S, Decl *D, const AttributeList
> &Attr) {
> > +  if (S.LangOpts.RenderScript) {
> > +    D->addAttr(::new (S.Context)
> > +               KernelAttr(Attr.getRange(), S.Context,
> > +                          Attr.getAttributeSpellingListIndex()));
> > +  } else {
> > +    S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "kernel";
> > +  }
>
> This is the wrong way to handle this; please add a LangOpt subclass in
> Attr.td and make this a target-specific attribute there.
>
>
Addressed in the above patch.


>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160610/9e4ea479/attachment.html>


More information about the cfe-commits mailing list