[PATCH] Support default integer attribute arguments
Aaron Ballman
aaron at aaronballman.com
Wed Nov 20 15:55:35 PST 2013
Attr.td has the notion of a DefaultIntArgument that currently does
nothing special. This patch adds table generator support such that
attributes which use the DefaultIntArgument type are given a static
const class member that names the default value. Eg)
let Args = [DefaultIntArgument<"Priority", 65535>];
Would give the generated attribute class a public member:
static const int DefaultPriority = 65535;
This can then be used in place of magic numbers elsewhere (and
consequently, this patch removes a few such FIXMEs).
~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DefaultValue.patch
Type: application/octet-stream
Size: 3814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131120/c8c19b43/attachment.obj>
More information about the cfe-commits
mailing list