Mutable builder used with Attribute::get to assemble attributes.
Synopsis
Declared in <llvm/IR/Attributes.h>
class AttrBuilder;
Description
This class is used in conjunction with the Attribute::get method to create an Attribute object. The object itself is uniquified. The Builder's value, however, is not. So this can be used as a quick way to test for equality, presence of attributes, etc.
Member Functions
Name |
Description |
|
Constructors |
|
|
Encode an |
|
This turns one (or two) ints into the form used internally in Attribute. |
|
Add an allocsize attribute, using the representation returned by Attribute.getIntValue(). |
|
|
|
This turns a byref type into the form used internally in Attribute. |
|
This turns a byval type into the form used internally in Attribute. |
|
Add captures attribute. |
|
Add a ConstantRange attribute with the given range. |
|
Add a ConstantRangeList attribute with the given ranges. |
|
This turns the number of dead_on_return bytes into the form used internally in Attribute. |
|
Add denormal_fpenv attribute. |
|
This turns the number of dereferenceable bytes into the form used internally in Attribute. |
|
This turns the number of dereferenceable_or_null bytes into the form used internally in Attribute. |
|
Add parameter attributes equivalent to metadata on instruction |
|
This turns an inalloca type into the form used internally in Attribute. |
|
Add initializes attribute. |
|
Add memory effect attribute. |
|
Add a |
|
This turns a preallocated type into the form used internally in Attribute. |
|
Add range attribute. |
|
Add integer attribute with raw value (packed/encoded if necessary). |
|
|
|
This turns a sret type into the form used internally in Attribute. |
|
Add a type attribute with the given type. |
|
This turns the unwind table kind into the form used internally in Attribute. |
|
This turns two ints into the form used internally in Attribute. |
|
Add a vscale_range attribute, using the representation returned by Attribute.getIntValue(). |
|
Return the attributes currently stored in this builder. |
|
Remove all attributes from the builder. |
|
|
|
Retrieve the alignment attribute, if it exists. |
|
Retrieve the allocsize args, or std::nullopt if the attribute does not exist. |
|
Return Attribute with the given Kind. The returned attribute will be invalid if the Kind is not present in the builder. |
|
Retrieve the byref type. |
|
Retrieve the byval type. |
|
Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise). |
|
Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise). |
|
Retrieve the inalloca type. |
|
Retrieve the bitmask for nofpclass, if the nofpclass attribute exists (fcNone is returned otherwise). |
|
Retrieve the preallocated type. |
|
Retrieve the range if the attribute exists (std::nullopt is returned otherwise). |
|
Return raw (possibly packed/encoded) value of integer attribute or std::nullopt if not set. |
|
Retrieve the stack alignment attribute, if it exists. |
|
Retrieve the sret type. |
|
Retrieve type for the given type attribute. |
|
Return true if the builder has IR‐level attributes. |
|
Add the attributes from the builder. Attributes in the passed builder overwrite attributes in this builder if they have the same key. |
|
Return true if the builder has any attribute that's in the specified builder. |
|
Remove the attributes from the builder. |
|
|
|
Return true if this builder's attributes equal those in |
|
Return true if this builder's attribute set differs from |
Non-Member Functions
Name |
Description |
Upgrade attributes that changed format or kind. |
|
Add a boolean string attribute named |
Created with MrDocs