[LLVMdev] Structure Types and ABI sizes
Jochen Wilhelmy
j.wilhelmy at arcor.de
Thu Feb 24 08:27:18 PST 2011
> If you're saying that:
>
>
>> %I = type { i32, i8 };
>>
> has size 5, yes, you're missing the alignment.
>
Ah, now I see. But I didn't say that
%I = type { i32, i8 };
has 5 bytes (because it has 8) but I thought that it has
5 bytes when being a member of %J, i.e.
%J = type { %I, i8 }
In this case %I also has 8 bytes right?
I was thinking too much in terms of C++ inheritance.
Then perhaps the tailpadding should be specified explicitly ;-)
%I = type { i32, i8 }; // 5 bytes
%I' = type { %I, tailpad}; // 8 bytes
%J = type { %I, i8 } // 6 bytes
-Jochen
More information about the llvm-dev
mailing list