PATCH: Add range-for iteration adapter for Function::arg_begin/end

Eli Bendersky eliben at
Wed Mar 26 10:36:38 PDT 2014


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()) {

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: function-arg-iterator-range.1.patch
Type: text/x-patch
Size: 1222 bytes
Desc: not available
URL: <>

More information about the llvm-commits mailing list