[PATCH] Add iterator for PHINode value/BB pair

David Blaikie dblaikie at gmail.com
Mon Aug 3 13:22:03 PDT 2015


I wouldn't mind a std::tuple inside the iterator, if that turns out to be
the easiest/tidiest solution - could totally be.

My concern was about adding global op overloads to tuple and/or otherwise
trying to make tuple itself into an iterator. Seemed like it could be
problematic.

On Mon, Aug 3, 2015 at 1:20 PM, Pete Cooper <peter_cooper at apple.com> wrote:

>
> On Aug 3, 2015, at 11:07 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com>
> wrote:
>
> I have the same twitch... it seems dangerous somehow to add API to
> std::tuple.  I think adding our own class (that wraps a `std::tuple<...>`)
> would feel safer, I guess because it's more explicit.  Kind of on the
> fence myself though.
>
>
> So i totally understand the bad feeling from the operator overloads.  I
> can change those to be helper methods.
>
> However, I think I misread David’s original email.  I thought he didn’t
> like the use of std::tuple at all.  David, mind clarifying?
>
> In particular, "avoid the quirk and implement a custom iterator that wraps
> all the other iterators" sounds to me like trying to find a way to avoid
> having a std::tuple inside the iterator.
>
> Pete
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150803/ab8d8001/attachment.html>


More information about the llvm-commits mailing list