On Tue, Feb 23, 2016 at 3:55 PM, David Blaikie <dblai...@gmail.com> wrote:
> > > On Tue, Feb 23, 2016 at 12:46 PM, Nico Weber <tha...@chromium.org> wrote: > >> On Tue, Feb 23, 2016 at 2:44 PM, David Blaikie via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> >>> >>> On Tue, Feb 23, 2016 at 11:30 AM, Nico Weber via cfe-commits < >>> cfe-commits@lists.llvm.org> wrote: >>> >>>> Author: nico >>>> Date: Tue Feb 23 13:30:43 2016 >>>> New Revision: 261674 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=261674&view=rev >>>> Log: >>>> Rename Action::begin() to Action::input_begin(). >>>> >>>> Also introduce inputs() that reutnrs an llvm::iterator_range. >>>> Iterating over A->inputs() is much less mysterious than >>>> iterating over *A. No intended behavior change. >>>> >>> >>> Seems like a strange change - is there ambiguity of what an Action is a >>> collection of? >>> >> >> Action isn't primarily a collection, but an action (a list of inputs, but >> also a kind, an output type, etc) :-) >> > > 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). > > >> I found this code pretty confusing, hence I renamed it. >> >> (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.) >> > > 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. > It's not very common in clang though, is it?
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits