llvm::getAllocAlignment

Gets the alignment argument for an aligned_alloc-like function, using either built-in knowledge based on fuction names/signatures or allocalign attributes. Note: the Value returned may not indicate a valid alignment, per the definition of the allocalign attribute.

Synopsis

Declared in <llvm/Analysis/MemoryBuiltins.h>

Value*
getAllocAlignment(
    CallBase const* V,
    TargetLibraryInfo const* TLI);

Return Value

LLVM Value Representation

Parameters

NameDescription
VBase class for all callable instructions (InvokeInst and CallInst) Holds everything related to calling a function.
TLIProvides information about what library functions are available for the current target.