[LLVMdev] Instruction::getNext and Instruction::getPrev are private

Ferad Zyulkyarov feradz at gmail.com
Fri May 11 10:39:44 PDT 2007


Thanks Antont and Gabor.. I will use the iterator instead..

On 5/11/07, Anton Korobeynikov <asl at math.spbu.ru> wrote:
> Hello, Ferad.
>
> > I switched to the upcoming version 2.0 branch and porting my code from
> > 1.9. Thanks there is not a lot to do. I found that
> > Instruction::getNext and Instruction::getPrev are private. Is this
> > intentional?
> Yes, incorrect usage of them caused hard-tracking bugs (e.g. calling
> getNext() on terminator returns you the last "dummy" instruction in the
> list, and so on).
>
> >  If yes, what would you recommend instead using them?
> Iterators?
>
> --
> With best regards, Anton Korobeynikov.
>
> Faculty of Mathematics & Mechanics, Saint Petersburg State University.
>
>
>


-- 
Ferad Zyulkyarov
Barcelona Supercomputing Center



More information about the llvm-dev mailing list