[LLVMdev] get maximum alignment size needed?

edA-qa mort-ora-y eda-qa at disemia.com
Tue Mar 5 22:06:31 PST 2013


Is there a standard way to get the maximum alignment needed by any type
for the target platform? I use the TargetData class to get individual
type alignments/sizes, but I don't see a function for target maximum.

I'm just trying to pack two structures together in memory, one following
the other. The offset to the second one should be constant (not
depending on its type), thus I'd like to figure out what the maximum
alignment for the platform is. That is, C++'s max_align_t.



-- 
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: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130306/f252526c/attachment.sig>


More information about the llvm-dev mailing list