llvm::emitMalloc

Emit a call to the malloc function.

Synopsis

Declared in <llvm/Transforms/Utils/BuildLibCalls.h>

Value*
emitMalloc(
    Value* Num,
    IRBuilderBase& B,
    DataLayout const& DL,
    TargetLibraryInfo const* TLI);

Return Value

The malloc call, or null if unavailable.

Parameters

NameDescription
NumNumber of bytes to allocate.
BIR builder used to create the call.
DLData layout used for size typing.
TLITarget library info describing available libcalls.