ΒΆOptional<llvm::APInt> getAllocSize(
const llvm::CallBase* CB,
const llvm::TargetLibraryInfo* TLI,
function_ref<const llvm::Value*(
const llvm::Value*)> Mapper =
[](const llvm::Value* V) { return V; })
Optional<llvm::APInt> getAllocSize(
const llvm::CallBase* CB,
const llvm::TargetLibraryInfo* TLI,
function_ref<const llvm::Value*(
const llvm::Value*)> Mapper =
[](const llvm::Value* V) { return V; })
Description
Return the size of the requested allocation. With a trivial mapper, this is similar to calling getObjectSize(..., Exact), but without looking through calls that return their argument. A mapper function can be used to replace one Value* (operand to the allocation) with another. This is useful when doing abstract interpretation.
Declared at: llvm/include/llvm/Analysis/MemoryBuiltins.h:110
Parameters
- const llvm::CallBase* CB
- const llvm::TargetLibraryInfo* TLI
- function_ref<const llvm::Value*( const llvm::Value*)> Mapper = [](const llvm::Value *V) { return V; }