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

Chandler Carruth chandlerc at google.com
Wed Mar 26 11:06:08 PDT 2014


I see no value in eagerly converting all the existing uses and a lot of
churn. Please don't.

I only converted the use_begin stuff because the iterator there was
changing anyways forcing the churn.
On Mar 26, 2014 11:03 AM, "David Blaikie" <dblaikie at gmail.com> wrote:

> On Wed, Mar 26, 2014 at 10:36 AM, 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()) {
> >     ...
> >   }
> >
> > 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?
>
> There seems to be lots of precedent for such changes already in both
> Clang and LLVM - is there anything that makes this particular example
> worthy of more review (see Owen Anderson, Chandler Carruth, and Aaron
> Ballman's patches to LLVM and Clang doing widescale changes/migrations
> to range-for).
>
> If there's nothing particularly noteworthy about this range over the
> others that have been migrated, you can probably just skip the
> precommit review here. (or take my words here as sufficient precommit
> review - essentially "if there's nothing special about this range, I
> (David Blaikie) would feel comfortable committing this, so I'm
> comfortable signing off on someone else committing it")
>
> - David
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140326/d1f5b22a/attachment.html>


More information about the llvm-commits mailing list