<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 13, 2016 at 4:29 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">silvas added a subscriber: silvas.<br>
silvas added a comment.<br>
<span class=""><br>
In <a href="http://reviews.llvm.org/D21076#456942" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21076#456942</a>, @dberlin wrote:<br>
<br>
> Note: bb->eraseFromParent now returns an iterator, so you can fix this by returning and using that instead  :)<br>
<br>
<br>
</span>Sorry, this is sort of a side comment: what iterator does it return? I'm having a hard time seeing based on the docs.<br>
<br>
<br></blockquote><div><br></div><div>Yeah, sadly, \return gets put only in the details you have to expand to see:<br><br></div><div>It says:</div><div><br></div><div>"</div><dl class="" style="font-family:"Lucida Grande",Verdana,Geneva,Arial,sans-serif;font-size:13px;line-height:16.9px;padding:0px 0px 0px 10px;color:rgb(0,0,0)"><dt style="font-weight:bold"><b>...</b></dt><dt style="font-weight:bold"><b><br></b></dt><dt style="font-weight:bold"><b>Returns:</b></dt><dd>an iterator pointing to the element after the erased one</dd></dl><p style="font-family:"Lucida Grande",Verdana,Geneva,Arial,sans-serif;font-size:13px;line-height:16.9px;color:rgb(0,0,0)">Definition at line <a class="" href="http://llvm.org/docs/doxygen/html/Instruction_8cpp_source.html#l00075" style="color:rgb(70,101,162);font-weight:bold">75</a> of file <a class="" href="http://llvm.org/docs/doxygen/html/Instruction_8cpp_source.html" style="color:rgb(70,101,162);font-weight:bold">Instruction.cpp</a>.</p><div>"</div><div><br></div><div>It's just returning with ilist->erase returns, which is the element after the erased one.</div><div>(or ->end() if there is no such element)</div><div><br></div><div>You can convert this to either a forward or reverse iterator directly, because it's an ilist.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<a href="http://reviews.llvm.org/D21076" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21076</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>