[cfe-commits] PATCH: wide strings alignment fix in clang

Sundeep sundeepk at codeaurora.org
Wed Aug 3 17:24:32 PDT 2011


Please find it attached.

-Sundeep

> -----Original Message-----
> From: John McCall [mailto:rjmccall at apple.com]
> Sent: Wednesday, August 03, 2011 5:43 PM
> To: Sundeep
> Cc: 'Craig Topper'; cfe-commits at cs.uiuc.edu
> Subject: Re: [cfe-commits] PATCH: wide strings alignment fix in clang
> 
> 
> On Aug 3, 2011, at 11:59 AM, Sundeep wrote:
> 
> > Hi Craig,
> >
> > I liked your idea. I verified that it fixes my test case. I also
> improved
> > your original patch as follows:
> >
> > 1. Updated 'GetAddrOfConstantString' and 'GetAddrOfConstantCString'
> APIs to
> > default assign Alignment to 1.
> > 2. Undid your changes to all call sites calling those APIs with
> alignment of
> > 1.
> >
> > The new patch is attached. John, please let me know if the new patch
> looks
> > ok.
> 
> This looks good, but I'd be slightly happier if you didn't need that
> dyn_cast<GlobalVariable> - we really don't ever want this to fail,
> because when it fails, we might not be getting the alignment right.
> Fortunately, it looks like the entries are always GlobalVariables.
> Please change ConstantStringMap's type to encode this
> assumption, and then you shouldn't need the dyn_cast.
> 
> With that, this is ready to go in, thanks!
> 
> John.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110803/7e92b343/attachment.txt>


More information about the cfe-commits mailing list