<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 30, 2014 at 11:14 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch creates a range accessor for attributes during tablegen, in<br>
addition to the iterators we already produce. It also updates a lot of<br>
iterator usages to be range usages.<br>
<br>
For the most part, there should be nothing contentious here, with one<br>
exception. In order to generate an accessor with a sensible<br>
identifier, we may need to pluralize the identifier. Eg)<br>
callableState_begin()/callableState_end() --> callableStates(), but<br>
args_begin()/args_end() --> args().<br>
<br>
I "solved" this with a poor-man's pluralizer that makes assumptions<br>
(which I've documented), but I think this is acceptable since this is<br>
only for use within variadic argument objects when tablegenning<br>
attributes. But I figured it was worth putting out as a patch to see<br>
if there were objections or better ideas.</blockquote><div><br></div><div>The only variadic attribute argument that is not called 'Args' is called 'CallableState', and I think it would be clearer to rename that one 'CallableStates' (independent of any range-related changes). Then you can get rid of the pluralization mechanism entirely.</div>
</div></div></div>