[cfe-dev] Rewrite of codegen-level struct/union layout

Eli Friedman eli.friedman at gmail.com
Wed May 21 07:37:43 PDT 2008


Per subject, attached patch almost completely rewrites the
struct/union algorithm.  The new version is a lot simpler; some of
that was refactoring code, and some of that was depending a lot more
on the information already calculated by the ASTContext.

Depending on the ASTContext to do struct layout should make it easier
to add support for constructs like packed and aligned, because this
will pick up any changes in the way the ASTContext does struct layout
for free.

On a side note, after I finished this patch, PHP compiled with clang
started working.  I'm not sure if I fixed a struct layout bug, or some
other change in my tree helped, but it was crashing on startup before
this patch, and now it passes most of its testsuite (although this is
with most of the extensions disabled).

-Eli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.txt
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080521/3993ede5/attachment.txt>


More information about the cfe-dev mailing list