<table class="memberdecls"><tbody><tr><td class="memItemRight" valign="bottom"><a class="el" href="http://llvm.org/docs/doxygen/html/classllvm_1_1ilist__node.html#a77b897207ef0a1ae95c404695aed9a4b">getPrevNode</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the previous node, or 0 for the list head. </td></tr></tbody></table>I don't see any method like hasPrevNode. <br>It can be a weird problem because "current->getPrevNode()" is indicating to "current" itself (the problem appears for the BB with only one element)?<br>
<br><br><br><br><div class="gmail_quote">On Thu, Dec 20, 2012 at 12:42 PM, Alexandru Ionut Diaconescu <span dir="ltr"><<a href="mailto:alexandruionutdiaconescu@gmail.com" target="_blank">alexandruionutdiaconescu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br><br>Thank you for your answer. If I want to use<br><br>then I have<br><br>error: ‘NodeTy* llvm::ilist_half_node<NodeTy>::getPrev() [with NodeTy = llvm::Instruction]’ is protected<br>
error: ‘llvm::ilist_half_node<llvm::Instruction>’ is not an accessible base of ‘llvm::Instruction’<br>
<br>Do you know any other method to access the previous instruction of a terminator instruction? PS: back() is not an option.<br><br><div class="gmail_quote">On Thu, Dec 20, 2012 at 12:06 PM, Stephen McGruer <span dir="ltr"><<a href="mailto:stephen.mcgruer@gmail.com" target="_blank">stephen.mcgruer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">current->getPrev()</blockquote></div><div class="HOEnZb"><div class="h5"><br><br clear="all"><br>-- <br><font style="color:rgb(153,153,153)">Best regards,</font><br style="color:rgb(153,153,153)">
<font style="color:rgb(153,153,153)">Alexandru Ionut Diaconescu</font><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><font style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Best regards,</font><br style="background-color:rgb(255,255,255);color:rgb(153,153,153)">
<font style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Alexandru Ionut Diaconescu</font><br>