Like getObjectSize(), but only for base objects.
Synopsis
Declared in <llvm/Analysis/MemoryBuiltins.h>
std::optional<TypeSize>
getBaseObjectSize(
Value const* Ptr,
DataLayout const& DL,
TargetLibraryInfo const* TLI,
ObjectSizeOpts Opts = {});
Description
Returns the size of base objects (like allocas, global variables and allocator calls) and std::nullopt otherwise. Requires ExactSizeFromOffset mode.
Return Value
The base object size, or std::nullopt if Ptr is not a base object.
Parameters
Name |
Description |
Ptr |
Pointer that may refer to a base object. |
DL |
Data layout used for type and pointer sizing. |
TLI |
Target library info used to identify allocation functions. |
Opts |
Options controlling how object size is evaluated. |
Created with MrDocs