[LLVMdev] IR sizeof?

edA-qa mort-ora-y eda-qa at disemia.com
Sun Nov 11 04:37:21 PST 2012


Yes, that is what I was looking for. I figured I could probably use
getelementptr but seeing the example is really helpful.

On 11/11/12 13:25, Richard Osborne wrote:
> Does this help?
> 
> http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt
> 
> On 11 Nov 2012, at 10:52, edA-qa mort-ora-y <eda-qa at disemia.com
> <mailto:eda-qa at disemia.com>> wrote:
> 
>> Is there a way to get the size of a type in the IR assembly code? I know
>> the size must be known since alloca and getelementptr both implicitly
>> use it, but I don't see any way to get access to the size directly.
>>
>> I know my final compiler will have to get the size itself, but I'm just
>> doing some simple tests directly in assembly now and am hoping there is
>> an easy way to get the size of a structure.
>>
>> -- 
>> edA-qa mort-ora-y
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Sign: Please digitally sign your emails.
>> Encrypt: I'm also happy to receive encrypted mail.
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>>         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 


-- 
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121111/fc7d1560/attachment.sig>


More information about the llvm-dev mailing list