<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 23, 2016 at 1:02 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div>On Tue, Feb 23, 2016 at 3:55 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br></div></span><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class=""><span>On Tue, Feb 23, 2016 at 12:46 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Feb 23, 2016 at 2:44 PM, David Blaikie via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Feb 23, 2016 at 11:30 AM, Nico Weber via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: nico<br>
Date: Tue Feb 23 13:30:43 2016<br>
New Revision: 261674<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=261674&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=261674&view=rev</a><br>
Log:<br>
Rename Action::begin() to Action::input_begin().<br>
<br>
Also introduce inputs() that reutnrs an llvm::iterator_range.<br>
Iterating over A->inputs() is much less mysterious than<br>
iterating over *A.  No intended behavior change.<br></blockquote><div><br></div></span><div>Seems like a strange change - is there ambiguity of what an Action is a collection of?</div></div></div></div></blockquote><div><br></div></span><div>Action isn't primarily a collection, but an action (a list of inputs, but also a kind, an output type, etc) :-) </div></div></div></div></blockquote><div><br></div></span><div>The analogy to llvm::Function, llvm::BasicBlock, etc, still seem somewhat apt (a Function isn't, in some sense, primarily a collection of basic blocks - it's a global value with a name and parameters, etc).</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I found this code pretty confusing, hence I renamed it.</div><div><br></div><div>(I do have a local change currently that gives it a second iterable thing, but this seemed like a good change independent of my local change.)</div></div></div></div></blockquote><div><br></div></span></span><div>Fair enough - just figured I'd point out there's a fair bit of precedent for thing-is-a-collection across LLVM, in case that provides a different perspective.</div></div></div></div></blockquote></div><br></div><div class="gmail_extra">It's not very common in clang though, is it?</div></div></blockquote><div><br>Seems pretty common, judging by a quick 'grep -r "  begin()' tools/clang/include' - lots of things that look like they're far more than a container, have begin functions.<br><br>- Dave</div></div><br></div></div>