[PATCH] Add iterator for PHINode value/BB pair

Tobias Edler von Koch tobias at codeaurora.org
Wed Jul 22 12:22:30 PDT 2015


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.



More information about the llvm-commits mailing list