SetInsertPoint does set both, but the GetInsertPoint returns only the Instruction (and not the BB).  I ran into this with the RAII class that saves the IRBuilder location.  Actually, Alexey's ASan bot helped me discover it :) <br /><br /><span>On 07/08/13, <b class="name">Eric Christopher </b> <echristo@gmail.com> wrote:</span><blockquote cite="mid:CALehDX7ja0ctp=jkZP0TLgZF7-bn-K2qSX4qw9x57Bvps+aH9g@mail.gmail.com" class="iwcQuote" style="border-left: 1px solid #00F; padding-left: 13px; margin-left: 0;" type="cite"><div class="mimepart text plain">On Mon, Jul 8, 2013 at 4:27 PM, Nadav Rotem <nrotem@apple.com> wrote:<br />> Author: nadav<br />> Date: Mon Jul  8 18:27:43 2013<br />> New Revision: 185883<br />><br />> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185883&view=rev" target="l">http://llvm.org/viewvc/llvm-project?rev=185883&view=rev</a><br />> Log:<br />> Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.<br />><br /><br />I'd run into this in the past and didn't think much of it because all<br />of the SetInsertPoint routines set both variables. How'd you run into<br />this?<br /><br />-eric<br /></div></blockquote>