[LLVMdev] bug in ilist_node::getPrevNode() ?
Erik Eckstein
eeckstein at apple.com
Thu Jul 10 05:59:19 PDT 2014
Hi all,
I stumbled over a problem in ilist_node::getPrevNode(). It crashes when invoked for the first element in a list.
It's because the Prev pointer of a first list element does not point to the sentinel but is just null.
First question: Is this really a bug or am I doing something wrong?
Second question: If it is a bug, what should be the correct behaviour? Either change insert() to let Prev of the first element really point to the sentinel or just change getPrevNode()?
I don't really need getPrevNode() because I can also use iterators but if this is really a bug, I think it should be fixed.
Thanks,
Erik
More information about the llvm-dev
mailing list