PATCH: Add range-for iteration adapter for Function::arg_begin/end
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Mar 26 11:06:23 PDT 2014
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.
Cheers,
Rafael
More information about the llvm-commits
mailing list