[LLVMdev] How to handle size_t in front ends?
Chris Lattner
sabre at nondot.org
Thu May 22 20:16:44 PDT 2008
On May 22, 2008, at 6:40 PM, Talin wrote:
>> LLVM already does this.
>>
>> http://www.nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt
>>
>> — Gordon
>>
> Is there a similar technique that would allow calculation of the
> alignment? (which is also required by the DWARF derived-type
> descriptor.)
There is more than one form of alignment. To find the struct field
alignment of something, you can do something like:
"sizeof({i8, T}) - sizeof(T)"
-Chris
More information about the llvm-dev
mailing list