[PATCH] Range accessors for tablegenning attributes

Aaron Ballman aaron at aaronballman.com
Wed Apr 30 11:14:33 PDT 2014


This patch creates a range accessor for attributes during tablegen, in
addition to the iterators we already produce. It also updates a lot of
iterator usages to be range usages.

For the most part, there should be nothing contentious here, with one
exception. In order to generate an accessor with a sensible
identifier, we may need to pluralize the identifier. Eg)
callableState_begin()/callableState_end() --> callableStates(), but
args_begin()/args_end() --> args().

I "solved" this with a poor-man's pluralizer that makes assumptions
(which I've documented), but I think this is acceptable since this is
only for use within variadic argument objects when tablegenning
attributes. But I figured it was worth putting out as a patch to see
if there were objections or better ideas.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RangeBasedAttributeArgs.patch
Type: application/octet-stream
Size: 13149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140430/1c59a317/attachment.obj>


More information about the cfe-commits mailing list