[LLVMdev] Structure Types and ABI sizes

Renato Golin renato.golin at arm.com
Wed Feb 16 01:53:40 PST 2011


On 16 February 2011 01:14, John McCall <rjmccall at apple.com> wrote:
> I think the obvious solution here is to use packed structs when the layout of an type as a base class would substantially differ from its layout as a complete object.  This loses some alignment information, but frontends need to be aggressive about providing alignment on loads/stores/etc. anyway.  I'm actually thinking of changing clang to do this.

That's actually a good idea... To have the normal structure when you
use the base directly and the packed version to be embedded into
derived types.

I managed to fix all structure size problems I've seen, but if packed
structs work the same way, it'll be much more elegant. Thanks John!


-- 
cheers,
--renato




More information about the llvm-dev mailing list