llvm::isDereferenceableAndAlignedPointer

Returns true if V is always a dereferenceable pointer with sufficient alignment.

Synopsis

Declared in <llvm/Analysis/Loads.h>

bool
isDereferenceableAndAlignedPointer(
    Value const* V,
    Type* Ty,
    Align Alignment,
    SimplifyQuery const& Q,
    bool IgnoreFree = false);

Description

The alignment must be greater or equal than requested. If the context instruction is specified performs context-sensitive analysis and returns true if the pointer is dereferenceable at the specified instruction. If IgnoreFree is set, ignore potential frees of the object.

Return Value

True if V is always a dereferenceable pointer with sufficient alignment.

Parameters

NameDescription
VPointer value to check.
TyType used to determine the access size.
AlignmentMinimum required alignment.
QQuery providing data layout and optional context instruction.
IgnoreFreeWhen true, ignore potential frees of the object.