class AttrBuilder
Declaration
class AttrBuilder { /* full declaration omitted */ };
Declared at: llvm/include/llvm/IR/Attributes.h:706
Method Overview
- public AttrBuilder(const llvm::Attribute & A)
- public AttrBuilder(llvm::AttributeList AS, unsigned int Idx)
- public AttrBuilder(llvm::AttributeSet AS)
- public AttrBuilder()
- public llvm::AttrBuilder & addAlignmentAttr(llvm::MaybeAlign Align)
- public inline llvm::AttrBuilder & addAlignmentAttr(unsigned int Align)
- public llvm::AttrBuilder & addAllocSizeAttr(unsigned int ElemSizeArg, const Optional<unsigned int> & NumElemsArg)
- public llvm::AttrBuilder & addAllocSizeAttrFromRawRepr(uint64_t RawAllocSizeRepr)
- public llvm::AttrBuilder & addAttribute(Attribute::AttrKind Val)
- public llvm::AttrBuilder & addAttribute(llvm::Attribute A)
- public llvm::AttrBuilder & addAttribute(llvm::StringRef A, llvm::StringRef V = llvm::StringRef())
- public llvm::AttrBuilder & addByValAttr(llvm::Type * Ty)
- public llvm::AttrBuilder & addDereferenceableAttr(uint64_t Bytes)
- public llvm::AttrBuilder & addDereferenceableOrNullAttr(uint64_t Bytes)
- public inline llvm::AttrBuilder & addStackAlignmentAttr(unsigned int Align)
- public llvm::AttrBuilder & addStackAlignmentAttr(llvm::MaybeAlign Align)
- public void clear()
- public bool contains(Attribute::AttrKind A) const
- public bool contains(llvm::StringRef A) const
- public bool empty() const
- public llvm::MaybeAlign getAlignment() const
- public std::pair<unsigned int, Optional<unsigned int>> getAllocSizeArgs() const
- public llvm::Type * getByValType() const
- public uint64_t getDereferenceableBytes() const
- public uint64_t getDereferenceableOrNullBytes() const
- public llvm::MaybeAlign getStackAlignment() const
- public bool hasAlignmentAttr() const
- public bool hasAttributes(llvm::AttributeList A, uint64_t Index) const
- public bool hasAttributes() const
- public llvm::AttrBuilder & merge(const llvm::AttrBuilder & B)
- public bool overlaps(const llvm::AttrBuilder & B) const
- public llvm::AttrBuilder & remove(const llvm::AttrBuilder & B)
- public llvm::AttrBuilder & removeAttribute(llvm::StringRef A)
- public llvm::AttrBuilder & removeAttribute(Attribute::AttrKind Val)
- public llvm::AttrBuilder & removeAttributes(llvm::AttributeList A, uint64_t WithoutIndex)
- public int td_attrs()
- public int td_attrs() const
- public int td_begin()
- public int td_begin() const
- public bool td_empty() const
- public int td_end()
- public int td_end() const
Methods
¶AttrBuilder(const llvm::Attribute& A)
AttrBuilder(const llvm::Attribute& A)
Declared at: llvm/include/llvm/IR/Attributes.h:719
Parameters
- const llvm::Attribute& A
¶AttrBuilder(llvm::AttributeList AS,
unsigned int Idx)
AttrBuilder(llvm::AttributeList AS,
unsigned int Idx)
Declared at: llvm/include/llvm/IR/Attributes.h:723
Parameters
- llvm::AttributeList AS
- unsigned int Idx
¶AttrBuilder(llvm::AttributeSet AS)
AttrBuilder(llvm::AttributeSet AS)
Declared at: llvm/include/llvm/IR/Attributes.h:724
Parameters
¶AttrBuilder()
AttrBuilder()
Declared at: llvm/include/llvm/IR/Attributes.h:717
¶llvm::AttrBuilder& addAlignmentAttr(
llvm::MaybeAlign Align)
llvm::AttrBuilder& addAlignmentAttr(
llvm::MaybeAlign Align)
Description
This turns an alignment into the form used internally in Attribute. This call has no effect if Align is not set.
Declared at: llvm/include/llvm/IR/Attributes.h:799
Parameters
- llvm::MaybeAlign Align
¶inline llvm::AttrBuilder& addAlignmentAttr(
unsigned int Align)
inline llvm::AttrBuilder& addAlignmentAttr(
unsigned int Align)
Description
This turns an int alignment (which must be a power of 2) into the form used internally in Attribute. This call has no effect if Align is 0. Deprecated, use the version using a MaybeAlign.
Declared at: llvm/include/llvm/IR/Attributes.h:805
Parameters
- unsigned int Align
¶llvm::AttrBuilder& addAllocSizeAttr(
unsigned int ElemSizeArg,
const Optional<unsigned int>& NumElemsArg)
llvm::AttrBuilder& addAllocSizeAttr(
unsigned int ElemSizeArg,
const Optional<unsigned int>& NumElemsArg)
Description
This turns one (or two) ints into the form used internally in Attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:830
Parameters
- unsigned int ElemSizeArg
- const Optional<unsigned int>& NumElemsArg
¶llvm::AttrBuilder& addAllocSizeAttrFromRawRepr(
uint64_t RawAllocSizeRepr)
llvm::AttrBuilder& addAllocSizeAttrFromRawRepr(
uint64_t RawAllocSizeRepr)
Description
Add an allocsize attribute, using the representation returned by Attribute.getIntValue().
Declared at: llvm/include/llvm/IR/Attributes.h:838
Parameters
- uint64_t RawAllocSizeRepr
¶llvm::AttrBuilder& addAttribute(
Attribute::AttrKind Val)
llvm::AttrBuilder& addAttribute(
Attribute::AttrKind Val)
Description
Add an attribute to the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:729
Parameters
- Attribute::AttrKind Val
¶llvm::AttrBuilder& addAttribute(llvm::Attribute A)
llvm::AttrBuilder& addAttribute(llvm::Attribute A)
Description
Add the Attribute object to the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:732
Parameters
¶llvm::AttrBuilder& addAttribute(
llvm::StringRef A,
llvm::StringRef V = llvm::StringRef())
llvm::AttrBuilder& addAttribute(
llvm::StringRef A,
llvm::StringRef V = llvm::StringRef())
Description
Add the target-dependent attribute to the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:735
Parameters
- llvm::StringRef A
- llvm::StringRef V = llvm::StringRef()
¶llvm::AttrBuilder& addByValAttr(llvm::Type* Ty)
llvm::AttrBuilder& addByValAttr(llvm::Type* Ty)
Description
This turns a byval type into the form used internally in Attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:834
Parameters
- llvm::Type* Ty
¶llvm::AttrBuilder& addDereferenceableAttr(
uint64_t Bytes)
llvm::AttrBuilder& addDereferenceableAttr(
uint64_t Bytes)
Description
This turns the number of dereferenceable bytes into the form used internally in Attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:823
Parameters
- uint64_t Bytes
¶llvm::AttrBuilder& addDereferenceableOrNullAttr(
uint64_t Bytes)
llvm::AttrBuilder& addDereferenceableOrNullAttr(
uint64_t Bytes)
Description
This turns the number of dereferenceable_or_null bytes into the form used internally in Attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:827
Parameters
- uint64_t Bytes
¶inline llvm::AttrBuilder& addStackAlignmentAttr(
unsigned int Align)
inline llvm::AttrBuilder& addStackAlignmentAttr(
unsigned int Align)
Description
This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute. This call has no effect if Align is 0. Deprecated, use the version using a MaybeAlign.
Declared at: llvm/include/llvm/IR/Attributes.h:817
Parameters
- unsigned int Align
¶llvm::AttrBuilder& addStackAlignmentAttr(
llvm::MaybeAlign Align)
llvm::AttrBuilder& addStackAlignmentAttr(
llvm::MaybeAlign Align)
Description
This turns a stack alignment into the form used internally in Attribute. This call has no effect if Align is not set.
Declared at: llvm/include/llvm/IR/Attributes.h:811
Parameters
- llvm::MaybeAlign Align
¶void clear()
void clear()
Declared at: llvm/include/llvm/IR/Attributes.h:726
¶bool contains(Attribute::AttrKind A) const
bool contains(Attribute::AttrKind A) const
Description
Return true if the builder has the specified attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:757
Parameters
- Attribute::AttrKind A
¶bool contains(llvm::StringRef A) const
bool contains(llvm::StringRef A) const
Description
Return true if the builder has the specified target-dependent attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:764
Parameters
¶bool empty() const
bool empty() const
Description
Return true if the builder contains no target-independent attributes.
Declared at: llvm/include/llvm/IR/Attributes.h:842
¶llvm::MaybeAlign getAlignment() const
llvm::MaybeAlign getAlignment() const
Description
Retrieve the alignment attribute, if it exists.
Declared at: llvm/include/llvm/IR/Attributes.h:777
¶std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() const
std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() const
Description
Retrieve the allocsize args, if the allocsize attribute exists. If it doesn't exist, pair(0, 0) is returned.
Declared at: llvm/include/llvm/IR/Attributes.h:795
¶llvm::Type* getByValType() const
llvm::Type* getByValType() const
Description
Retrieve the byval type.
Declared at: llvm/include/llvm/IR/Attributes.h:791
¶uint64_t getDereferenceableBytes() const
uint64_t getDereferenceableBytes() const
Description
Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise).
Declared at: llvm/include/llvm/IR/Attributes.h:784
¶uint64_t getDereferenceableOrNullBytes() const
uint64_t getDereferenceableOrNullBytes() const
Description
Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise).
Declared at: llvm/include/llvm/IR/Attributes.h:788
¶llvm::MaybeAlign getStackAlignment() const
llvm::MaybeAlign getStackAlignment() const
Description
Retrieve the stack alignment attribute, if it exists.
Declared at: llvm/include/llvm/IR/Attributes.h:780
¶bool hasAlignmentAttr() const
bool hasAlignmentAttr() const
Description
Return true if the builder has an alignment attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:774
¶bool hasAttributes(llvm::AttributeList A,
uint64_t Index) const
bool hasAttributes(llvm::AttributeList A,
uint64_t Index) const
Description
Return true if the builder has any attribute that's in the specified attribute.
Declared at: llvm/include/llvm/IR/Attributes.h:771
Parameters
- llvm::AttributeList A
- uint64_t Index
¶bool hasAttributes() const
bool hasAttributes() const
Description
Return true if the builder has IR-level attributes.
Declared at: llvm/include/llvm/IR/Attributes.h:767
¶llvm::AttrBuilder& merge(
const llvm::AttrBuilder& B)
llvm::AttrBuilder& merge(
const llvm::AttrBuilder& B)
Description
Add the attributes from the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:747
Parameters
- const llvm::AttrBuilder& B
¶bool overlaps(const llvm::AttrBuilder& B) const
bool overlaps(const llvm::AttrBuilder& B) const
Description
Return true if the builder has any attribute that's in the specified builder.
Declared at: llvm/include/llvm/IR/Attributes.h:754
Parameters
- const llvm::AttrBuilder& B
¶llvm::AttrBuilder& remove(
const llvm::AttrBuilder& B)
llvm::AttrBuilder& remove(
const llvm::AttrBuilder& B)
Description
Remove the attributes from the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:750
Parameters
- const llvm::AttrBuilder& B
¶llvm::AttrBuilder& removeAttribute(
llvm::StringRef A)
llvm::AttrBuilder& removeAttribute(
llvm::StringRef A)
Description
Remove the target-dependent attribute to the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:744
Parameters
¶llvm::AttrBuilder& removeAttribute(
Attribute::AttrKind Val)
llvm::AttrBuilder& removeAttribute(
Attribute::AttrKind Val)
Description
Remove an attribute from the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:738
Parameters
- Attribute::AttrKind Val
¶llvm::AttrBuilder& removeAttributes(
llvm::AttributeList A,
uint64_t WithoutIndex)
llvm::AttrBuilder& removeAttributes(
llvm::AttributeList A,
uint64_t WithoutIndex)
Description
Remove the attributes from the builder.
Declared at: llvm/include/llvm/IR/Attributes.h:741
Parameters
- llvm::AttributeList A
- uint64_t WithoutIndex
¶int td_attrs()
int td_attrs()
Declared at: llvm/include/llvm/IR/Attributes.h:857
¶int td_attrs() const
int td_attrs() const
Declared at: llvm/include/llvm/IR/Attributes.h:859
¶int td_begin()
int td_begin()
Declared at: llvm/include/llvm/IR/Attributes.h:851
¶int td_begin() const
int td_begin() const
Declared at: llvm/include/llvm/IR/Attributes.h:854
¶bool td_empty() const
bool td_empty() const
Declared at: llvm/include/llvm/IR/Attributes.h:863
¶int td_end()
int td_end()
Declared at: llvm/include/llvm/IR/Attributes.h:852
¶int td_end() const
int td_end() const
Declared at: llvm/include/llvm/IR/Attributes.h:855