Expand description
Struct layout computation for AIR types.
Reimplements LLVM’s StructLayout algorithm for computing field byte
offsets, sizes, and alignment. Uses System V AMD64 ABI defaults which
cover ~99% of x86-64 C/C++ code.
Functions§
- abi_
alignment - Returns the ABI alignment in bytes for a type under System V AMD64 rules.
- abi_
alignment_ with_ ptr - Returns the ABI alignment in bytes for a type, using the specified pointer width.
- align_
up 🔒 - Round
valueup to the next multiple ofalign. - alloc_
size - Returns the allocation size in bytes for a type.
- alloc_
size_ with_ ptr - Returns the allocation size in bytes for a type, using the specified pointer width.
- compute_
struct_ layout - Computes struct layout: field byte offsets and total size (including tail padding).
- compute_
struct_ layout_ with_ ptr - Computes struct layout: field byte offsets and total size (including tail padding), using the specified pointer width.