[LLVMdev] How to handle size_t in front ends?

Talin
2008-05-23T01:40:47Z

Gordon Henriksen wrote:
> On 2008-05-21, at 22:17, Talin wrote:
>
>> As I understand this, this issue and others like it all require a
>> difficult step to be taken, which is to introduce the concept of a
>> constant whose value is not known until code generation time or at
>> least
>> until the compilation target is fully known. These "late bound
>> constants" could then be used to implement
"sizeof(type)" and other
>> constants whose value is different on different targets.
>>
>
> 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.)

-- Talin