Add the allocsize attribute to the attribute set at the given arg index. Returns a new list because attribute lists are immutable.
Declared in <llvm/IR/Attributes.h>
[[nodiscard]]
AttributeList
addAllocSizeParamAttr(
LLVMContext& C,
unsigned int ArgNo,
unsigned int ElemSizeArg,
std::optional<unsigned int> const& NumElemsArg) const;
A new attribute list with the attributes added.
The return value should not be discarded.
| Name | Description |
|---|---|
| C | Context used to uniquify the result. |
| ArgNo | Zero-based argument index receiving the attribute. |
| ElemSizeArg | Argument index holding the element size. |
| NumElemsArg | Optional argument index holding the element count. |