LLVM: llvm::AttributeSet Class Reference (original ) (raw )This class holds the attributes for a particular argument, parameter, function, or return value. More...
#include "[llvm/IR/Attributes.h](Attributes%5F8h%5Fsource.html)"
Public Member Functions
AttributeSet ()=default
AttributeSet is a trivially copyable value type.
AttributeSet (const AttributeSet &)=default
~AttributeSet ()=default
bool
operator== (const AttributeSet &O) const
bool
operator!= (const AttributeSet &O) const
LLVM_ABI AttributeSet
addAttribute (LLVMContext &C , Attribute::AttrKind Kind) const
Add an argument attribute.
LLVM_ABI AttributeSet
addAttribute (LLVMContext &C , StringRef Kind, StringRef Value =StringRef ()) const
Add a target-dependent attribute.
LLVM_ABI AttributeSet
addAttributes (LLVMContext &C , AttributeSet AS) const
Add attributes to the attribute set.
AttributeSet
addAttributes (LLVMContext &C , const AttrBuilder &B ) const
Add attributes to the attribute set.
LLVM_ABI AttributeSet
removeAttribute (LLVMContext &C , Attribute::AttrKind Kind) const
Remove the specified attribute from this set.
LLVM_ABI AttributeSet
removeAttribute (LLVMContext &C , StringRef Kind) const
Remove the specified attribute from this set.
LLVM_ABI AttributeSet
removeAttributes (LLVMContext &C , const AttributeMask &AttrsToRemove) const
Remove the specified attributes from this set.
LLVM_ABI std::optional< AttributeSet >
intersectWith (LLVMContext &C , AttributeSet Other ) const
Try to intersect this AttributeSet with Other.
LLVM_ABI unsigned
getNumAttributes () const
Return the number of attributes in this set.
bool
hasAttributes () const
Return true if attributes exists in this set.
LLVM_ABI bool
hasAttribute (Attribute::AttrKind Kind) const
Return true if the attribute exists in this set.
LLVM_ABI bool
hasAttribute (StringRef Kind) const
Return true if the attribute exists in this set.
LLVM_ABI Attribute
getAttribute (Attribute::AttrKind Kind) const
Return the attribute object.
LLVM_ABI Attribute
getAttribute (StringRef Kind) const
Return the target-dependent attribute object.
LLVM_ABI MaybeAlign
getAlignment () const
LLVM_ABI MaybeAlign
getStackAlignment () const
LLVM_ABI uint64_t
getDereferenceableBytes () const
LLVM_ABI uint64_t
getDereferenceableOrNullBytes () const
LLVM_ABI Type *
getByValType () const
LLVM_ABI Type *
getStructRetType () const
LLVM_ABI Type *
getByRefType () const
LLVM_ABI Type *
getPreallocatedType () const
LLVM_ABI Type *
getInAllocaType () const
LLVM_ABI Type *
getElementType () const
LLVM_ABI std::optional< std::pair< unsigned , std::optional< unsigned > > >
getAllocSizeArgs () const
LLVM_ABI unsigned
getVScaleRangeMin () const
LLVM_ABI std::optional< unsigned >
getVScaleRangeMax () const
LLVM_ABI UWTableKind
getUWTableKind () const
LLVM_ABI AllocFnKind
getAllocKind () const
LLVM_ABI MemoryEffects
getMemoryEffects () const
LLVM_ABI CaptureInfo
getCaptureInfo () const
LLVM_ABI FPClassTest
getNoFPClass () const
LLVM_ABI std::string
getAsString (bool InAttrGrp=false) const
LLVM_ABI bool
hasParentContext (LLVMContext &C ) const
Return true if this attribute set belongs to the LLVMContext .
LLVM_ABI iterator
begin () const
LLVM_ABI iterator
end () const
void
dump () const
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.
Definition at line 361 of file Attributes.h .
◆ iterator
llvm::AttributeSet::AttributeSet ( )
default
◆ AttributeSet() [2/2]◆ ~AttributeSet()
llvm::AttributeSet::~AttributeSet ( )
default
◆ addAttribute() [1/2]◆ addAttribute() [2/2]◆ addAttributes() [1/2]◆ addAttributes() [2/2]◆ begin()
◆ dump()◆ end()
◆ get() [1/2]◆ get() [2/2]Definition at line 927 of file Attributes.cpp .
References AttributeSet() , B() , llvm::CallingConv::C , and llvm::AttributeSetNode::get() .
Referenced by addAttribute() , addAttribute() , addAttributes() , addAttributes() , AddParamAndFnBasicAttributes() , intersectWith() , llvm::promoteCall() , removeAttribute() , removeAttribute() , and removeAttributes() .
◆ getAlignment()◆ getAllocKind()◆ getAllocSizeArgs()
std::optional< std::pair< unsigned , std::optional< unsigned > > > AttributeSet::getAllocSizeArgs
(
)
const
◆ getAsString()
std::string AttributeSet::getAsString
(
bool
InAttrGrp = false
)
const
◆ getAttribute() [1/2]◆ getAttribute() [2/2]◆ getByRefType()
Type * AttributeSet::getByRefType
(
)
const
◆ getByValType()
Type * AttributeSet::getByValType
(
)
const
◆ getCaptureInfo()◆ getDereferenceableBytes()
uint64_t AttributeSet::getDereferenceableBytes
(
)
const
◆ getDereferenceableOrNullBytes()
uint64_t AttributeSet::getDereferenceableOrNullBytes
(
)
const
◆ getElementType()
Type * AttributeSet::getElementType
(
)
const
◆ getInAllocaType()
Type * AttributeSet::getInAllocaType
(
)
const
◆ getMemoryEffects()◆ getNoFPClass()◆ getNumAttributes()
unsigned AttributeSet::getNumAttributes
(
)
const
Return the number of attributes in this set.
Definition at line 1133 of file Attributes.cpp .
◆ getPreallocatedType()
Type * AttributeSet::getPreallocatedType
(
)
const
◆ getStackAlignment()
MaybeAlign AttributeSet::getStackAlignment
(
)
const
◆ getStructRetType()
Type * AttributeSet::getStructRetType
(
)
const
◆ getUWTableKind()◆ getVScaleRangeMax()
std::optional< unsigned > AttributeSet::getVScaleRangeMax
(
)
const
◆ getVScaleRangeMin()
unsigned AttributeSet::getVScaleRangeMin
(
)
const
◆ hasAttribute() [1/2]◆ hasAttribute() [2/2]Return true if the attribute exists in this set.
Definition at line 1141 of file Attributes.cpp .
◆ hasAttributes()
bool llvm::AttributeSet::hasAttributes ( ) const
inline
◆ hasParentContext()◆ intersectWith()Try to intersect this AttributeSet with Other.
Returns std::nullopt if the two lists are inherently incompatible (imply different behavior, not just analysis).
Definition at line 1004 of file Attributes.cpp .
References assert() , begin() , llvm::CallingConv::C , end() , get() , llvm::Attribute::getAlignment() , getAttribute() , llvm::Attribute::getCaptureInfo() , llvm::Attribute::getKindAsEnum() , llvm::Attribute::getMemoryEffects() , llvm::Attribute::getNoFPClass() , llvm::Attribute::getRange() , llvm::Attribute::getValueAsInt() , llvm::Attribute::hasKindAsEnum() , llvm::Attribute::intersectMustPreserve() , llvm::Attribute::intersectWithAnd() , llvm::Attribute::intersectWithCustom() , llvm::Attribute::intersectWithMin() , llvm::Attribute::isEnumAttrKind() , llvm::ConstantRange::isFullSet() , llvm::Attribute::isIntAttrKind() , llvm::Attribute::isValid() , llvm_unreachable , llvm::Other , llvm::ConstantRange::unionWith() , and llvm::MaybeAlign::valueOrOne() .
◆ operator!=()◆ operator==()◆ removeAttribute() [1/2]◆ removeAttribute() [2/2]◆ removeAttributes()◆ DenseMapInfotemplate<typename Ty, typename Enable >
The documentation for this class was generated from the following files: