llvm::getAllocationFamily

If a function is part of an allocation family (e.g. malloc/realloc/calloc/free), return the identifier for its family of functions.

Synopsis

Declared in <llvm/Analysis/MemoryBuiltins.h>

std::optional<StringRef>
getAllocationFamily(
    Value const* I,
    TargetLibraryInfo const* TLI);

Return Value

The family identifier, or std::nullopt if not in a family.

Parameters

NameDescription
IValue that may be a call in an allocation family.
TLITarget library info used to identify allocation functions.