llvm::getInitialValueOfAllocation

If this is a call to an allocation function that initializes memory to a fixed value, return said value in the requested type. Otherwise, return nullptr.

Synopsis

Declared in <llvm/Analysis/MemoryBuiltins.h>

Constant*
getInitialValueOfAllocation(
    Value const* V,
    TargetLibraryInfo const* TLI,
    Type* Ty);

Return Value

The initial value in Ty, or nullptr if not an initializing allocation.

Parameters

NameDescription
VValue that may be an initializing allocation call.
TLITarget library info used to identify allocation functions.
TyType in which to materialize the initial value.