[llvm] r185883 - Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.

Nadav Rotem nrotem at apple.com
Mon Jul 8 17:06:30 PDT 2013


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 :) 

On 07/08/13, Eric Christopher  <echristo at gmail.com> wrote:
> On Mon, Jul 8, 2013 at 4:27 PM, Nadav Rotem <nrotem at apple.com> wrote:
> > Author: nadav
> > Date: Mon Jul  8 18:27:43 2013
> > New Revision: 185883
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=185883&view=rev
> > Log:
> > Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.
> >
> 
> I'd run into this in the past and didn't think much of it because all
> of the SetInsertPoint routines set both variables. How'd you run into
> this?
> 
> -eric
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130708/cec22fee/attachment.html>


More information about the llvm-commits mailing list