LLVM 17.0.0git
|
#include "llvm/IR/Attributes.h"
Public Types | |
using | iterator = const Attribute * |
Static Public Member Functions | |
static AttributeSet | get (LLVMContext &C, const AttrBuilder &B) |
static AttributeSet | get (LLVMContext &C, ArrayRef< Attribute > Attrs) |
Friends | |
template<typename Ty , typename Enable > | |
struct | DenseMapInfo |
Definition at line 295 of file Attributes.h.
using llvm::AttributeSet::iterator = const Attribute * |
Definition at line 391 of file Attributes.h.
|
default |
AttributeSet is a trivially copyable value type.
Referenced by get().
|
default |
|
default |
AttributeSet AttributeSet::addAttribute | ( | LLVMContext & | C, |
Attribute::AttrKind | Kind | ||
) | const |
Add an argument attribute.
Returns a new set because attribute sets are immutable.
Definition at line 701 of file Attributes.cpp.
References addAttributes(), B, llvm::CallingConv::C, get(), and hasAttribute().
Referenced by llvm::OpenMPIRBuilder::addAttributes().
AttributeSet AttributeSet::addAttribute | ( | LLVMContext & | C, |
StringRef | Kind, | ||
StringRef | Value = StringRef() |
||
) | const |
Add a target-dependent attribute.
Returns a new set because attribute sets are immutable.
Definition at line 709 of file Attributes.cpp.
References addAttributes(), B, llvm::CallingConv::C, and get().
AttributeSet AttributeSet::addAttributes | ( | LLVMContext & | C, |
AttributeSet | AS | ||
) | const |
Add attributes to the attribute set.
Returns a new set because attribute sets are immutable.
Definition at line 716 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttributes().
Referenced by addAttribute(), and llvm::OpenMPIRBuilder::addAttributes().
AttributeSet::iterator AttributeSet::begin | ( | ) | const |
Definition at line 855 of file Attributes.cpp.
References llvm::AttributeSetNode::begin().
LLVM_DUMP_METHOD void AttributeSet::dump | ( | ) | const |
Definition at line 864 of file Attributes.cpp.
References llvm::dbgs(), and getAsString().
AttributeSet::iterator AttributeSet::end | ( | ) | const |
Definition at line 859 of file Attributes.cpp.
References llvm::AttributeSetNode::end().
|
static |
Definition at line 697 of file Attributes.cpp.
References AttributeSet(), llvm::CallingConv::C, and llvm::AttributeSetNode::get().
|
static |
Definition at line 693 of file Attributes.cpp.
References AttributeSet(), B, llvm::CallingConv::C, and llvm::AttributeSetNode::get().
Referenced by addAttribute(), llvm::AttributeList::addAttributeAtIndex(), addAttributes(), llvm::AttributeList::addAttributesAtIndex(), llvm::AttributeList::addParamAttribute(), llvm::AttributeList::get(), llvm::promoteCall(), removeAttribute(), and removeAttributes().
MaybeAlign AttributeSet::getAlignment | ( | ) | const |
Definition at line 776 of file Attributes.cpp.
References llvm::AttributeSetNode::getAlignment().
Referenced by llvm::AttributeList::getParamAlignment(), and llvm::AttributeList::getRetAlignment().
AllocFnKind AttributeSet::getAllocKind | ( | ) | const |
Definition at line 835 of file Attributes.cpp.
References llvm::AttributeSetNode::getAllocKind(), and llvm::Unknown.
Referenced by llvm::AttributeList::getAllocKind().
std::optional< std::pair< unsigned, std::optional< unsigned > > > AttributeSet::getAllocSizeArgs | ( | ) | const |
Definition at line 817 of file Attributes.cpp.
References llvm::AttributeSetNode::getAllocSizeArgs().
std::string AttributeSet::getAsString | ( | bool | InAttrGrp = false | ) | const |
Definition at line 843 of file Attributes.cpp.
References llvm::AttributeSetNode::getAsString().
Referenced by dump(), and llvm::AttributeList::getAsString().
Attribute AttributeSet::getAttribute | ( | Attribute::AttrKind | Kind | ) | const |
Return the attribute object.
Definition at line 768 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttribute().
Referenced by llvm::AttributeList::getAttributeAtIndex().
Return the target-dependent attribute object.
Definition at line 772 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttribute().
Type * AttributeSet::getByRefType | ( | ) | const |
Definition at line 792 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamByRefType().
Type * AttributeSet::getByValType | ( | ) | const |
Definition at line 796 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamByValType().
uint64_t AttributeSet::getDereferenceableBytes | ( | ) | const |
Definition at line 784 of file Attributes.cpp.
References llvm::AttributeSetNode::getDereferenceableBytes().
Referenced by llvm::AttributeList::getParamDereferenceableBytes(), and llvm::AttributeList::getRetDereferenceableBytes().
uint64_t AttributeSet::getDereferenceableOrNullBytes | ( | ) | const |
Definition at line 788 of file Attributes.cpp.
References llvm::AttributeSetNode::getDereferenceableOrNullBytes().
Referenced by llvm::AttributeList::getParamDereferenceableOrNullBytes(), and llvm::AttributeList::getRetDereferenceableOrNullBytes().
Type * AttributeSet::getElementType | ( | ) | const |
Definition at line 812 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamElementType().
Type * AttributeSet::getInAllocaType | ( | ) | const |
Definition at line 808 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamInAllocaType().
MemoryEffects AttributeSet::getMemoryEffects | ( | ) | const |
Definition at line 839 of file Attributes.cpp.
References llvm::AttributeSetNode::getMemoryEffects(), and llvm::MemoryEffects::unknown().
Referenced by llvm::AttributeList::getMemoryEffects().
unsigned AttributeSet::getNumAttributes | ( | ) | const |
Return the number of attributes in this set.
Definition at line 756 of file Attributes.cpp.
References llvm::AttributeSetNode::getNumAttributes().
Type * AttributeSet::getPreallocatedType | ( | ) | const |
Definition at line 804 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamPreallocatedType().
MaybeAlign AttributeSet::getStackAlignment | ( | ) | const |
Definition at line 780 of file Attributes.cpp.
References llvm::AttributeSetNode::getStackAlignment().
Referenced by llvm::AttributeList::getFnStackAlignment(), llvm::AttributeList::getParamStackAlignment(), and llvm::AttributeList::getRetStackAlignment().
Type * AttributeSet::getStructRetType | ( | ) | const |
Definition at line 800 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamStructRetType().
UWTableKind AttributeSet::getUWTableKind | ( | ) | const |
Definition at line 831 of file Attributes.cpp.
References llvm::AttributeSetNode::getUWTableKind(), and llvm::None.
Referenced by llvm::AttributeList::getUWTableKind().
std::optional< unsigned > AttributeSet::getVScaleRangeMax | ( | ) | const |
Definition at line 827 of file Attributes.cpp.
References llvm::AttributeSetNode::getVScaleRangeMax().
unsigned AttributeSet::getVScaleRangeMin | ( | ) | const |
Definition at line 823 of file Attributes.cpp.
References llvm::AttributeSetNode::getVScaleRangeMin().
bool AttributeSet::hasAttribute | ( | Attribute::AttrKind | Kind | ) | const |
Return true if the attribute exists in this set.
Definition at line 760 of file Attributes.cpp.
References llvm::AttributeSetNode::hasAttribute().
Referenced by addAttribute(), llvm::AttributeList::hasAttributeAtIndex(), llvm::GlobalVariable::hasImplicitSection(), and removeAttribute().
Return true if the attribute exists in this set.
Definition at line 764 of file Attributes.cpp.
References llvm::AttributeSetNode::hasAttribute().
|
inline |
Return true if attributes exists in this set.
Definition at line 355 of file Attributes.h.
Referenced by addAttributes(), llvm::AttributeList::get(), llvm::AttributeList::hasAttributesAtIndex(), and hasParentContext().
bool AttributeSet::hasParentContext | ( | LLVMContext & | C | ) | const |
Return true if this attribute set belongs to the LLVMContext.
Definition at line 847 of file Attributes.cpp.
References assert(), llvm::CallingConv::C, hasAttributes(), and llvm::AttributeSetNode::Profile().
|
inline |
Definition at line 319 of file Attributes.h.
|
inline |
Definition at line 318 of file Attributes.h.
AttributeSet AttributeSet::removeAttribute | ( | LLVMContext & | C, |
Attribute::AttrKind | Kind | ||
) | const |
Remove the specified attribute from this set.
Returns a new set because attribute sets are immutable.
Definition at line 729 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttribute().
AttributeSet AttributeSet::removeAttribute | ( | LLVMContext & | C, |
StringRef | Kind | ||
) | const |
Remove the specified attribute from this set.
Returns a new set because attribute sets are immutable.
Definition at line 737 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttribute().
AttributeSet AttributeSet::removeAttributes | ( | LLVMContext & | C, |
const AttributeMask & | AttrsToRemove | ||
) | const |
Remove the specified attributes from this set.
Returns a new set because attribute sets are immutable.
Definition at line 745 of file Attributes.cpp.
References B, llvm::CallingConv::C, and get().
|
friend |
Definition at line 297 of file Attributes.h.