[PATCH] Add iterator for PHINode value/BB pair
Daniel Berlin
dberlin at dberlin.org
Wed Jul 22 12:40:27 PDT 2015
If you can't modify it, the iterator name's functions or type should
reflect that :)
On Wed, Jul 22, 2015 at 12:22 PM, Tobias Edler von Koch
<tobias at codeaurora.org> wrote:
> On Wed, 22 Jul 2015 12:11:39 -0700 "Duncan P. N. Exon Smith"
> <dexonsmith at apple.com> wrote:
>
>>
>> > On 2015-Jul-21, at 21:20, Pete Cooper <peter_cooper at apple.com> wrote:
>> >
>> > Thanks for all the feedback. This is a patch which addresses all of it.
>> >
>> > <phinode.diff>
>> >
>>
>> > +
>> > + const PHINodeEdge operator*() const {
>>
>> No reason for the const in `const PHINodeEdge` here.
>
> I think it should be const because otherwise it would give the
> impression that you can actually modify the PHINode through this
> iterator by assinging to Value or Block... which you can't.
>
> Tobias
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
> Linux Foundation Collaborative Project.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list