llvm::AttributeList::addDereferenceableOrNullParamAttr

Add the dereferenceable_or_null attribute to the attribute set at the given arg index. Returns a new list because attribute lists are immutable.

Synopsis

Declared in <llvm/IR/Attributes.h>

[[nodiscard]]
AttributeList
addDereferenceableOrNullParamAttr(
    LLVMContext& C,
    unsigned int ArgNo,
    uint64_t Bytes) const;

Return Value

A new attribute list with the attributes added.

NOTE

The return value should not be discarded.

Parameters

NameDescription
CContext used to uniquify the result.
ArgNoZero-based argument index.
BytesNumber of dereferenceable-or-null bytes.