StructLayout getSizeInBits()

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.

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