<div dir="ltr">Uploaded <a href="http://reviews.llvm.org/D21240">http://reviews.llvm.org/D21240</a> with the requested changes.  <br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 10, 2016 at 7:39 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">> +def Kernel : Attr {<br>
<br>
Please rename this to RenderScriptKernel. We have another attribute<br>
that is spelled "kernel" already, and we want to distinguish between<br>
them to reduce confusion.<br></blockquote><div><br></div><div>Addressed in the above patch. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
> +  let Spellings = [GNU<"kernel">];<br>
<br>
Is there a reason this isn't also spelled with a C++ attribute spelling?</blockquote><div><br></div><div>RenderScript is a C99 variant and the C++ spelling is not needed/supported.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">> +static void handleKernelAttr(Sema &S, Decl *D, const AttributeList &Attr) {<br>
> +  if (S.LangOpts.RenderScript) {<br>
> +    D->addAttr(::new (S.Context)<br>
> +               KernelAttr(Attr.getRange(), S.Context,<br>
> +                          Attr.getAttributeSpellingListIndex()));<br>
> +  } else {<br>
> +    S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "kernel";<br>
> +  }<br>
<br>
This is the wrong way to handle this; please add a LangOpt subclass in<br>
Attr.td and make this a target-specific attribute there.<br><br></blockquote><div><br></div><div>Addressed in the above patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br></blockquote></div></div></div>