class AttributeSet
Declaration
class AttributeSet { /* full declaration omitted */ };
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.
Declared at: llvm/include/llvm/IR/Attributes.h:290
Member Variables
- private llvm::AttributeSetNode* SetNode = nullptr
- Private implementation pointer.
Method Overview
- public AttributeSet()
- public AttributeSet(const llvm::AttributeSet &)
- private AttributeSet(llvm::AttributeSetNode * ASN)
- public llvm::AttributeSet addAttribute(llvm::LLVMContext & C, Attribute::AttrKind Kind) const
- public llvm::AttributeSet addAttribute(llvm::LLVMContext & C, llvm::StringRef Kind, llvm::StringRef Value = llvm::StringRef()) const
- public llvm::AttributeSet addAttributes(llvm::LLVMContext & C, llvm::AttributeSet AS) const
- public llvm::AttributeSet::iterator begin() const
- public void dump() const
- public llvm::AttributeSet::iterator end() const
- public static llvm::AttributeSet get(llvm::LLVMContext & C, ArrayRef<llvm::Attribute> Attrs)
- public static llvm::AttributeSet get(llvm::LLVMContext & C, const llvm::AttrBuilder & B)
- public llvm::MaybeAlign getAlignment() const
- public llvm::AllocFnKind getAllocKind() const
- public std::pair<unsigned int, Optional<unsigned int>> getAllocSizeArgs() const
- public std::string getAsString(bool InAttrGrp = false) const
- public llvm::Attribute getAttribute(Attribute::AttrKind Kind) const
- public llvm::Attribute getAttribute(llvm::StringRef Kind) const
- public llvm::Type * getByRefType() const
- public llvm::Type * getByValType() const
- public uint64_t getDereferenceableBytes() const
- public uint64_t getDereferenceableOrNullBytes() const
- public llvm::Type * getElementType() const
- public llvm::Type * getInAllocaType() const
- public unsigned int getNumAttributes() const
- public llvm::Type * getPreallocatedType() const
- public llvm::MaybeAlign getStackAlignment() const
- public llvm::Type * getStructRetType() const
- public llvm::UWTableKind getUWTableKind() const
- public Optional<unsigned int> getVScaleRangeMax() const
- public unsigned int getVScaleRangeMin() const
- public bool hasAttribute(llvm::StringRef Kind) const
- public bool hasAttribute(Attribute::AttrKind Kind) const
- public bool hasAttributes() const
- public bool hasParentContext(llvm::LLVMContext & C) const
- public llvm::AttributeSet removeAttribute(llvm::LLVMContext & C, Attribute::AttrKind Kind) const
- public llvm::AttributeSet removeAttribute(llvm::LLVMContext & C, llvm::StringRef Kind) const
- public llvm::AttributeSet removeAttributes(llvm::LLVMContext & C, const llvm::AttributeMask & AttrsToRemove) const
- public ~AttributeSet()
Methods
¶AttributeSet()
AttributeSet()
Description
AttributeSet is a trivially copyable value type.
Declared at: llvm/include/llvm/IR/Attributes.h:306
¶AttributeSet(const llvm::AttributeSet&)
AttributeSet(const llvm::AttributeSet&)
Declared at: llvm/include/llvm/IR/Attributes.h:307
Parameters
- const llvm::AttributeSet&
¶AttributeSet(llvm::AttributeSetNode* ASN)
AttributeSet(llvm::AttributeSetNode* ASN)
Declared at: llvm/include/llvm/IR/Attributes.h:302
Parameters
¶llvm::AttributeSet addAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) const
llvm::AttributeSet addAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) const
Description
Add an argument attribute. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:318
Parameters
- llvm::LLVMContext& C
- Attribute::AttrKind Kind
¶llvm::AttributeSet addAttribute(
llvm::LLVMContext& C,
llvm::StringRef Kind,
llvm::StringRef Value =
llvm::StringRef()) const
llvm::AttributeSet addAttribute(
llvm::LLVMContext& C,
llvm::StringRef Kind,
llvm::StringRef Value =
llvm::StringRef()) const
Description
Add a target-dependent attribute. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:323
Parameters
- llvm::LLVMContext& C
- llvm::StringRef Kind
- llvm::StringRef Value = llvm::StringRef()
¶llvm::AttributeSet addAttributes(
llvm::LLVMContext& C,
llvm::AttributeSet AS) const
llvm::AttributeSet addAttributes(
llvm::LLVMContext& C,
llvm::AttributeSet AS) const
Description
Add attributes to the attribute set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:328
Parameters
¶llvm::AttributeSet::iterator begin() const
llvm::AttributeSet::iterator begin() const
Declared at: llvm/include/llvm/IR/Attributes.h:386
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/IR/Attributes.h:389
¶llvm::AttributeSet::iterator end() const
llvm::AttributeSet::iterator end() const
Declared at: llvm/include/llvm/IR/Attributes.h:387
¶static llvm::AttributeSet get(
llvm::LLVMContext& C,
ArrayRef<llvm::Attribute> Attrs)
static llvm::AttributeSet get(
llvm::LLVMContext& C,
ArrayRef<llvm::Attribute> Attrs)
Declared at: llvm/include/llvm/IR/Attributes.h:311
Parameters
- llvm::LLVMContext& C
- ArrayRef<llvm::Attribute> Attrs
¶static llvm::AttributeSet get(
llvm::LLVMContext& C,
const llvm::AttrBuilder& B)
static llvm::AttributeSet get(
llvm::LLVMContext& C,
const llvm::AttrBuilder& B)
Declared at: llvm/include/llvm/IR/Attributes.h:310
Parameters
- llvm::LLVMContext& C
- const llvm::AttrBuilder& B
¶llvm::MaybeAlign getAlignment() const
llvm::MaybeAlign getAlignment() const
Declared at: llvm/include/llvm/IR/Attributes.h:364
¶llvm::AllocFnKind getAllocKind() const
llvm::AllocFnKind getAllocKind() const
Declared at: llvm/include/llvm/IR/Attributes.h:378
¶std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() const
std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() const
Declared at: llvm/include/llvm/IR/Attributes.h:374
¶std::string getAsString(
bool InAttrGrp = false) const
std::string getAsString(
bool InAttrGrp = false) const
Declared at: llvm/include/llvm/IR/Attributes.h:379
Parameters
- bool InAttrGrp = false
¶llvm::Attribute getAttribute(
Attribute::AttrKind Kind) const
llvm::Attribute getAttribute(
Attribute::AttrKind Kind) const
Description
Return the attribute object.
Declared at: llvm/include/llvm/IR/Attributes.h:359
Parameters
- Attribute::AttrKind Kind
¶llvm::Attribute getAttribute(
llvm::StringRef Kind) const
llvm::Attribute getAttribute(
llvm::StringRef Kind) const
Description
Return the target-dependent attribute object.
Declared at: llvm/include/llvm/IR/Attributes.h:362
Parameters
- llvm::StringRef Kind
¶llvm::Type* getByRefType() const
llvm::Type* getByRefType() const
Declared at: llvm/include/llvm/IR/Attributes.h:370
¶llvm::Type* getByValType() const
llvm::Type* getByValType() const
Declared at: llvm/include/llvm/IR/Attributes.h:368
¶uint64_t getDereferenceableBytes() const
uint64_t getDereferenceableBytes() const
Declared at: llvm/include/llvm/IR/Attributes.h:366
¶uint64_t getDereferenceableOrNullBytes() const
uint64_t getDereferenceableOrNullBytes() const
Declared at: llvm/include/llvm/IR/Attributes.h:367
¶llvm::Type* getElementType() const
llvm::Type* getElementType() const
Declared at: llvm/include/llvm/IR/Attributes.h:373
¶llvm::Type* getInAllocaType() const
llvm::Type* getInAllocaType() const
Declared at: llvm/include/llvm/IR/Attributes.h:372
¶unsigned int getNumAttributes() const
unsigned int getNumAttributes() const
Description
Return the number of attributes in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:347
¶llvm::Type* getPreallocatedType() const
llvm::Type* getPreallocatedType() const
Declared at: llvm/include/llvm/IR/Attributes.h:371
¶llvm::MaybeAlign getStackAlignment() const
llvm::MaybeAlign getStackAlignment() const
Declared at: llvm/include/llvm/IR/Attributes.h:365
¶llvm::Type* getStructRetType() const
llvm::Type* getStructRetType() const
Declared at: llvm/include/llvm/IR/Attributes.h:369
¶llvm::UWTableKind getUWTableKind() const
llvm::UWTableKind getUWTableKind() const
Declared at: llvm/include/llvm/IR/Attributes.h:377
¶Optional<unsigned int> getVScaleRangeMax() const
Optional<unsigned int> getVScaleRangeMax() const
Declared at: llvm/include/llvm/IR/Attributes.h:376
¶unsigned int getVScaleRangeMin() const
unsigned int getVScaleRangeMin() const
Declared at: llvm/include/llvm/IR/Attributes.h:375
¶bool hasAttribute(llvm::StringRef Kind) const
bool hasAttribute(llvm::StringRef Kind) const
Description
Return true if the attribute exists in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:356
Parameters
- llvm::StringRef Kind
¶bool hasAttribute(Attribute::AttrKind Kind) const
bool hasAttribute(Attribute::AttrKind Kind) const
Description
Return true if the attribute exists in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:353
Parameters
- Attribute::AttrKind Kind
¶bool hasAttributes() const
bool hasAttributes() const
Description
Return true if attributes exists in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:350
¶bool hasParentContext(llvm::LLVMContext& C) const
bool hasParentContext(llvm::LLVMContext& C) const
Description
Return true if this attribute set belongs to the LLVMContext.
Declared at: llvm/include/llvm/IR/Attributes.h:382
Parameters
¶llvm::AttributeSet removeAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) const
llvm::AttributeSet removeAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) const
Description
Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:333
Parameters
- llvm::LLVMContext& C
- Attribute::AttrKind Kind
¶llvm::AttributeSet removeAttribute(
llvm::LLVMContext& C,
llvm::StringRef Kind) const
llvm::AttributeSet removeAttribute(
llvm::LLVMContext& C,
llvm::StringRef Kind) const
Description
Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:338
Parameters
- llvm::LLVMContext& C
- llvm::StringRef Kind
¶llvm::AttributeSet removeAttributes(
llvm::LLVMContext& C,
const llvm::AttributeMask& AttrsToRemove)
const
llvm::AttributeSet removeAttributes(
llvm::LLVMContext& C,
const llvm::AttributeMask& AttrsToRemove)
const
Description
Remove the specified attributes from this set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:344
Parameters
- llvm::LLVMContext& C
- const llvm::AttributeMask& AttrsToRemove
¶~AttributeSet()
~AttributeSet()
Declared at: llvm/include/llvm/IR/Attributes.h:308