[PATCH] Fix alignment issues in LLVM.

James Y Knight jyknight at google.com
Tue Jun 16 15:06:33 PDT 2015

On Tue, Jun 16, 2015 at 2:04 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

> > On 2015-Jun-16, at 09:32, Reid Kleckner <rnk at google.com> wrote:
> >
> > BTW, Duncan recently rewrote this so I'll add him.
> >
> LGTM once you've addressed Reid's comments, although I have some nitpicks
> below.
> Isn't there some logic like this in `User` too?  Pete was changing it
> around recently

Yes, there is. Will add an assert there too.

> > -
> > +// Assert objects tacked on the end of FunctionType won't be misaligned
> > +static_assert(AlignOf<FunctionType>::Alignment >= AlignOf<Type
> *>::Alignment,
> > +              "");
> Please put the comment inside the assertion, so we get a decent compiler
> error.
>     static_assert(..., "Expected FunctionType not to change alignment");

Huh. I've always found the string rather superfluous, given the compiler
pointing to the error line of code, anyways. But, if you think it's an
improvement, I can definitely go ahead and do that (and the ones in the
larger patch for clang, too, of course).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150616/d4eb0b6e/attachment.html>

More information about the llvm-commits mailing list