PATCH: Add range-for iteration adapter for Function::arg_begin/end
Eli Bendersky
eliben at google.com
Wed Mar 26 11:12:43 PDT 2014
On Wed, Mar 26, 2014 at 11:06 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> On 26 March 2014 13:36, Eli Bendersky <eliben at google.com> wrote:
> > Hello,
> >
> > This patch is in similar vein to what done earlier to
> > Module::globals/aliases etc. I would really like to iterate over function
> > arguments like this in new code:
> >
> > for (Argument Arg : F.args()) {
> > ...
> > }
>
>
> That is fine.
>
> > The question is: would it be OK to change existing code from explicit
> > iteration with the .args_begin/args_end idiom to this new idiom?
>
> Probably yes, we have been changing many other iterators, this should
> probably not be an exception.
>
>
Thanks for the review, all. Committed in r204835. I won't do large-scale
changes just for this reason, but will feel free to convert locally in code
touched by existing patches.
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140326/0bb34af4/attachment.html>
More information about the llvm-commits
mailing list