[LLVMdev] variable sized structs in LLVM

Reid Spencer reid at x10sys.com
Mon Jun 20 08:43:29 PDT 2005


Yes, for that you need TargetData:

http://illuvium.net/docs/doxygen/classllvm_1_1TargetData.html

Reid.

On Mon, 2005-06-20 at 17:08 +0200, holger krekel wrote:
> Hi Reid, 
> 
> On Mon, Jun 20, 2005 at 07:08 -0700, Reid Spencer wrote:
> > The thing you're missing is that LLVM's primitive types have well known,
> > fixed sizes that are not target dependent. A ulong is 8 bytes. A uint is
> > 4 bytes. A ushort is 2 bytes. Etc. and always.
> 
> Don't aligning rules make it hard to compute the size of a
> whole struct from the sizes of it's members? 
> And what about pointers? 
> 
> cheers, 
> 
>     holger
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050620/d0ed1c48/attachment.sig>


More information about the llvm-dev mailing list