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:214
Method Overview
- public AttributeSet(const llvm::AttributeSet &)
- public AttributeSet()
- 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 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 * getByValType() const
- public uint64_t getDereferenceableBytes() const
- public uint64_t getDereferenceableOrNullBytes() const
- public unsigned int getNumAttributes() const
- public llvm::MaybeAlign getStackAlignment() const
- public bool hasAttribute(Attribute::AttrKind Kind) const
- public bool hasAttribute(llvm::StringRef Kind) const
- public bool hasAttributes() 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::AttrBuilder & AttrsToRemove) const
- public ~AttributeSet()
Methods
¶AttributeSet(const llvm::AttributeSet&)
AttributeSet(const llvm::AttributeSet&)Declared at: llvm/include/llvm/IR/Attributes.h:231
Parameters
- const llvm::AttributeSet&
¶AttributeSet()
AttributeSet()Description
AttributeSet is a trivially copyable value type.
Declared at: llvm/include/llvm/IR/Attributes.h:230
¶llvm::AttributeSet addAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) const
llvm::AttributeSet addAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) constDescription
Add an argument attribute. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:242
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()) constDescription
Add a target-dependent attribute. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:247
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) constDescription
Add attributes to the attribute set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:252
Parameters
¶llvm::AttributeSet::iterator begin() const
llvm::AttributeSet::iterator begin() constDeclared at: llvm/include/llvm/IR/Attributes.h:298
¶void dump() const
void dump() constDeclared at: llvm/include/llvm/IR/Attributes.h:301
¶llvm::AttributeSet::iterator end() const
llvm::AttributeSet::iterator end() constDeclared at: llvm/include/llvm/IR/Attributes.h:299
¶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:235
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:234
Parameters
- llvm::LLVMContext& C
- const llvm::AttrBuilder& B
¶llvm::MaybeAlign getAlignment() const
llvm::MaybeAlign getAlignment() constDeclared at: llvm/include/llvm/IR/Attributes.h:288
¶std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() const
std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() constDeclared at: llvm/include/llvm/IR/Attributes.h:293
¶std::string getAsString(
bool InAttrGrp = false) const
std::string getAsString(
bool InAttrGrp = false) constDeclared at: llvm/include/llvm/IR/Attributes.h:294
Parameters
- bool InAttrGrp = false
¶llvm::Attribute getAttribute(
Attribute::AttrKind Kind) const
llvm::Attribute getAttribute(
Attribute::AttrKind Kind) constDescription
Return the attribute object.
Declared at: llvm/include/llvm/IR/Attributes.h:283
Parameters
- Attribute::AttrKind Kind
¶llvm::Attribute getAttribute(
llvm::StringRef Kind) const
llvm::Attribute getAttribute(
llvm::StringRef Kind) constDescription
Return the target-dependent attribute object.
Declared at: llvm/include/llvm/IR/Attributes.h:286
Parameters
- llvm::StringRef Kind
¶llvm::Type* getByValType() const
llvm::Type* getByValType() constDeclared at: llvm/include/llvm/IR/Attributes.h:292
¶uint64_t getDereferenceableBytes() const
uint64_t getDereferenceableBytes() constDeclared at: llvm/include/llvm/IR/Attributes.h:290
¶uint64_t getDereferenceableOrNullBytes() const
uint64_t getDereferenceableOrNullBytes() constDeclared at: llvm/include/llvm/IR/Attributes.h:291
¶unsigned int getNumAttributes() const
unsigned int getNumAttributes() constDescription
Return the number of attributes in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:271
¶llvm::MaybeAlign getStackAlignment() const
llvm::MaybeAlign getStackAlignment() constDeclared at: llvm/include/llvm/IR/Attributes.h:289
¶bool hasAttribute(Attribute::AttrKind Kind) const
bool hasAttribute(Attribute::AttrKind Kind) constDescription
Return true if the attribute exists in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:277
Parameters
- Attribute::AttrKind Kind
¶bool hasAttribute(llvm::StringRef Kind) const
bool hasAttribute(llvm::StringRef Kind) constDescription
Return true if the attribute exists in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:280
Parameters
- llvm::StringRef Kind
¶bool hasAttributes() const
bool hasAttributes() constDescription
Return true if attributes exists in this set.
Declared at: llvm/include/llvm/IR/Attributes.h:274
¶llvm::AttributeSet removeAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) const
llvm::AttributeSet removeAttribute(
llvm::LLVMContext& C,
Attribute::AttrKind Kind) constDescription
Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:257
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) constDescription
Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:262
Parameters
- llvm::LLVMContext& C
- llvm::StringRef Kind
¶llvm::AttributeSet removeAttributes(
llvm::LLVMContext& C,
const llvm::AttrBuilder& AttrsToRemove) const
llvm::AttributeSet removeAttributes(
llvm::LLVMContext& C,
const llvm::AttrBuilder& AttrsToRemove) constDescription
Remove the specified attributes from this set. Returns a new set because attribute sets are immutable.
Declared at: llvm/include/llvm/IR/Attributes.h:268
Parameters
- llvm::LLVMContext& C
- const llvm::AttrBuilder& AttrsToRemove
¶~AttributeSet()
~AttributeSet()Declared at: llvm/include/llvm/IR/Attributes.h:232