[cfe-dev] Rewrite of codegen-level struct/union layout
eli.friedman at gmail.com
Wed May 21 18:11:59 PDT 2008
On Wed, May 21, 2008 at 4:25 PM, Devang Patel <dpatel at apple.com> wrote:
> On May 21, 2008, at 7:37 AM, Eli Friedman wrote:
>> 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.
> One thing to note is, struct layout is very much target specific and not all
> target specific information is required for Semantic Analysis.
Hmm? We need to be able to compute the size and alignment of arbitrary
structures in Sema, and we need to be able to compute the positions of
arbitrary non-bitfield members in Sema. What exactly is left that
Sema doesn't need?
More information about the cfe-dev