[LLVMdev] ReplaceInstWithInst appears to invalidate BB iterator?
Duncan Sands
baldrick at free.fr
Sun May 8 09:28:41 PDT 2011
Hi Justin,
> Thanks Duncan. I was able to correct my code to work around that nuance. I was
> under the impression that BasicBlock::iterators mapped onto something similar to
> an STL list which supports erasing arbitrary elements. Thanks for the help!
instructions contain pointers to the next and previous instructions; an
iterator is just a pointer to an instruction that advances by looking at
the value of the instructions "next" pointer. IIRC.
Ciao, Duncan.
More information about the llvm-dev
mailing list