<div dir="ltr">I tripped over that also, it seems like a bug to me.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 10, 2014 at 5:59 AM, Erik Eckstein <span dir="ltr"><<a href="mailto:eeckstein@apple.com" target="_blank">eeckstein@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I stumbled over a problem in ilist_node::getPrevNode(). It crashes when invoked for the first element in a list.<br>
It's because the Prev pointer of a first list element does not point to the sentinel  but is just null.<br>
<br>
First question: Is this really a bug or am I doing something wrong?<br>
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()?<br>
<br>
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.<br>
<br>
Thanks,<br>
Erik<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>