[PATCH] Microsoft C Record Layout

Warren Hunt whunt at google.com
Fri Jun 28 15:10:52 PDT 2013


Yes, the fields are laid out essentially using C layout and spurious
alignment is added to everything else...  I'll put it in one file and
investigate CRTP.

-Warren


On Fri, Jun 28, 2013 at 3:05 PM, John McCall <rjmccall at apple.com> wrote:

> On Jun 28, 2013, at 2:50 PM, Warren Hunt <whunt at google.com> wrote:
> > That is reasonable, we can certainly fuse them into a single file and
> that will make sharing some C-layout code easier.  I can do that.  I
> personally find (more) smaller files easier to navigate and tend to break
> things apart.  Of course that causes either duplication of code or
> re-factoring into headers.
>
> I'd strongly prefer to avoid any unnecessary duplication here just because
> there are so many small levers affecting class layout, but pulling code
> into a CRTP (or otherwise) base in a private header wouldn't be
> unreasonable if the code is like 90% divergent.  I am assuming here that
> this is not *just* C layout but is also useful for layout of fields in C++
> classes (although IIRC MSVC lays out the fields separately and then drops
> them into the larger class as a chunk, potentially leaving spurious
> alignment padding after the vfptr/vbptr/bases).
>
> John.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130628/2cd9318e/attachment.html>


More information about the cfe-commits mailing list