Immutable set of attributes for one argument, parameter, function, or return.

Synopsis

Declared in <llvm/IR/Attributes.h>

class AttributeSet;

Description

This class holds the attributes for a particular argument, parameter, function, or return value. It is an immutable value type that is cheap to copy. Adding and removing enum attributes is intended to be fast, but adding and removing string or integer attributes involves a FoldingSet lookup.

Type Aliases

Name

Description

iterator

Iterator over attributes in this set.

Member Functions

Name

Description

AttributeSet [constructor]

Constructors

~AttributeSet [destructor]

Destroy this attribute set (trivially; uniquified storage is owned elsewhere).

addAttribute

addAttribute overloads

addAttributes

Add attributes to the attribute set. Returns a new set because attribute sets are immutable.

begin

Return an iterator to the first attribute in this set.

dump

Dump this attribute set to stderr (for debugging).

end

Return an iterator past the last attribute in this set.

getAlignment

Return the alignment from this attribute set, if present.

getAllocKind

Return the allockind bitmask describing this allocation function.

getAllocSizeArgs

Return the allocsize argument indexes, if present.

getAsString

Return a textual IR representation of the attributes in this set.

getAttribute

getAttribute overloads

getByRefType

Return the type for the byref attribute, or null if absent.

getByValType

Return the type for the byval attribute, or null if absent.

getCaptureInfo

Return capture information from this attribute set.

getDeadOnReturnInfo

Return dead‐on‐return information from this attribute set.

getDereferenceableBytes

Return the byte count from dereferenceable, or 0 if absent.

getDereferenceableOrNullBytes

Return the byte count from dereferenceable_or_null, or 0 if absent.

getElementType

Return the type for the elementtype attribute, or null if absent.

getInAllocaType

Return the type for the inalloca attribute, or null if absent.

getMemoryEffects

Return the memory effects encoded in this attribute set.

getNoFPClass

Return the nofpclass mask from this attribute set.

getNumAttributes

Return the number of attributes in this set.

getPreallocatedType

Return the type for the preallocated attribute, or null if absent.

getStackAlignment

Return the stack alignment from this attribute set, if present.

getStructRetType

Return the structure type for the sret attribute, or null if absent.

getUWTableKind

Return the unwind table kind from this attribute set.

getVScaleRangeMax

Return the maximum vscale from vscale_range, or nullopt if unbounded or absent.

getVScaleRangeMin

Return the minimum vscale for the vscale_range attribute, or 1 if absent.

hasAttribute

Return true if the attribute exists in this set.

hasAttributes

Return true if attributes exists in this set.

hasParentContext

Return true if this attribute set belongs to the LLVMContext.

intersectWith

Try to intersect this AttributeSet with Other. Returns std::nullopt if the two lists are inherently incompatible (imply different behavior, not just analysis).

removeAttribute

Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.

removeAttributes

Remove the specified attributes from this set. Returns a new set because attribute sets are immutable.

operator==

Return true if both sets refer to the same uniquified node.

operator!=

Return true if the sets refer to different uniquified nodes.

Static Member Functions

Name

Description

get

get overloads

Friends

Name

Description

llvm::DenseMapInfo

Traits type that supplies DenseMap hashing and equality for value type T.

llvm::AttributeListImpl

Internal uniquified storage for an AttributeList.

Non-Member Functions

Name

Description

Intrinsic::getFnAttributes

Return the function attributes for an intrinsic.

Created with MrDocs