[LLVMdev] StructLayout getSizeInBits()

Ryan Taylor ryta1203 at gmail.com
Thu Mar 22 14:04:12 PDT 2012


Ah, my mistake, I forgot to realize the min struct size in the target
datalayout, thanks.

On Thu, Mar 22, 2012 at 1:49 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:

> LLVMers,
>
>    I have a const StructType *StTy where I call
> TargetData->getStructLayout(const_cast<StructType*>(StTy))->getSizeInBits()
> but it continues to return 64 regardless of the actual size of the struct?
> I want the size of the structure in bits, including alignment padding for
> offset calculations, is this not the right function call?
>
> Thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120322/455959ba/attachment.html>


More information about the llvm-dev mailing list