llvm::alignTo

Round Size up to a multiple of Align.

Synopsis

Declared in <llvm/Support/TypeSize.h>

constexpr
TypeSize
alignTo(
    TypeSize Size,
    uint64_t Align);

Description

Returns a TypeSize with a known minimum size that is the next integer (mod 2**64) that is greater than or equal to Size and is a multiple of Align. Align must be non-zero.

Similar to the alignTo functions in MathExtras.h

Return Value

TypeSize with known-min rounded up to a multiple of Align.

Parameters

NameDescription
SizeQuantity whose known-min size is rounded up.
AlignNon-zero alignment in the same units as Size.