[PATCH] Add PragmaAttr and Pragma Spelling to Tablegen

Reid Kleckner rnk at google.com
Fri May 23 14:41:30 PDT 2014


A pragma spelling makes a lot of sense to me.  We have lots of attributes
(optimize, section, cf_audited_transfer) that are applied implicitly by
pragmas, and it would be good to render them that way in diagnostics.

I'm not convinced we need a PragmaAttr base class for pretty printing.
 Maybe we need some other mechanism for allowing attributes to provide
custom pretty printers.  Aaron, what do you think?

My first idea is to add a tablegen property like "HasPrettyPrinter = 0 or
1" that supresses emission of the default printPretty method.  Then again,
we kind of want the default version when the GNU and C++11 spellings of the
attribute are used.


On Fri, May 23, 2014 at 2:17 PM, Tyler Nowicki <tnowicki at apple.com> wrote:

> Hi,
>
> As requested here is a patch to add PragmaAttr and Pragma spelling to
> tablgen and make use of those in the LoopHintAttr. This patch builds off
> the patch patch given in the '#pragma vectorize’ thread. This is a git
> patch so please using 'patch -p1’ to apply it.
>
>
>
>
> Thanks,
>
> Tyler
>
> _______________________________________________
> 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/20140523/56f874f3/attachment.html>


More information about the cfe-commits mailing list