PATCH: fix building invalid IR lowering initializer list

Richard Smith richard at
Mon Mar 16 16:19:46 PDT 2015

On Mon, Mar 16, 2015 at 4:00 PM, Nick Lewycky <nlewycky at> wrote:

> The attached patch fixes a case where we produce an invalid store where
> the value type is not the same as the pointee type of the pointer. This
> occurs when lowering to a global variable because the GV must have the type
> of a pointer to its initializer, yet the initializer is not quite the same
> that we use for the value. Fix it up by adding a cast.
> Ben, I've cc'd you because I think this is a regression from your r231564.
> Please review!

Do the SD_Thread and SD_Static cases need the same handling? It looks like
both of those cases can also return a Value with the wrong Type.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the cfe-commits mailing list