LLVM 20.0.0git
|
#include "IR/AttributeImpl.h"
Static Public Member Functions | |
static void | Profile (FoldingSetNodeID &ID, Attribute::AttrKind Kind) |
static void | Profile (FoldingSetNodeID &ID, Attribute::AttrKind Kind, uint64_t Val) |
static void | Profile (FoldingSetNodeID &ID, StringRef Kind, StringRef Values) |
static void | Profile (FoldingSetNodeID &ID, Attribute::AttrKind Kind, Type *Ty) |
static void | Profile (FoldingSetNodeID &ID, Attribute::AttrKind Kind, const ConstantRange &CR) |
static void | Profile (FoldingSetNodeID &ID, Attribute::AttrKind Kind, ArrayRef< ConstantRange > Val) |
Protected Types | |
enum | AttrEntryKind { EnumAttrEntry , IntAttrEntry , StringAttrEntry , TypeAttrEntry , ConstantRangeAttrEntry , ConstantRangeListAttrEntry } |
Protected Member Functions | |
AttributeImpl (AttrEntryKind KindID) | |
Definition at line 42 of file AttributeImpl.h.
|
protected |
Enumerator | |
---|---|
EnumAttrEntry | |
IntAttrEntry | |
StringAttrEntry | |
TypeAttrEntry | |
ConstantRangeAttrEntry | |
ConstantRangeListAttrEntry |
Definition at line 46 of file AttributeImpl.h.
|
inlineprotected |
Definition at line 55 of file AttributeImpl.h.
|
delete |
int AttributeImpl::cmp | ( | const AttributeImpl & | AI, |
bool | KindOnly | ||
) | const |
Used to sort attributes.
KindOnly controls if the sort includes the attributes' values or just the kind.
Definition at line 854 of file Attributes.cpp.
References assert(), llvm::StringRef::compare(), getKindAsEnum(), getKindAsString(), getValueAsInt(), getValueAsString(), isConstantRangeAttribute(), isConstantRangeListAttribute(), isEnumAttribute(), isIntAttribute(), isStringAttribute(), and isTypeAttribute().
Referenced by llvm::Attribute::cmpKind(), and operator<().
Attribute::AttrKind AttributeImpl::getKindAsEnum | ( | ) | const |
Definition at line 811 of file Attributes.cpp.
References assert(), isConstantRangeAttribute(), isConstantRangeListAttribute(), isEnumAttribute(), isIntAttribute(), and isTypeAttribute().
Referenced by cmp(), llvm::Attribute::getKindAsEnum(), hasAttribute(), and Profile().
StringRef AttributeImpl::getKindAsString | ( | ) | const |
Definition at line 827 of file Attributes.cpp.
References assert(), and isStringAttribute().
Referenced by cmp(), llvm::Attribute::getKindAsString(), hasAttribute(), and Profile().
bool AttributeImpl::getValueAsBool | ( | ) | const |
Definition at line 822 of file Attributes.cpp.
References assert(), and getValueAsString().
Referenced by llvm::Attribute::getValueAsBool().
const ConstantRange & AttributeImpl::getValueAsConstantRange | ( | ) | const |
Definition at line 842 of file Attributes.cpp.
References assert(), and isConstantRangeAttribute().
Referenced by llvm::Attribute::getRange(), llvm::Attribute::getValueAsConstantRange(), and Profile().
ArrayRef< ConstantRange > AttributeImpl::getValueAsConstantRangeList | ( | ) | const |
Definition at line 848 of file Attributes.cpp.
References assert(), and isConstantRangeListAttribute().
Referenced by llvm::Attribute::getInitializes(), llvm::Attribute::getValueAsConstantRangeList(), and Profile().
uint64_t AttributeImpl::getValueAsInt | ( | ) | const |
Definition at line 817 of file Attributes.cpp.
References assert(), and isIntAttribute().
Referenced by cmp(), llvm::Attribute::getAlignment(), llvm::Attribute::getAllocKind(), llvm::Attribute::getAllocSizeArgs(), llvm::Attribute::getDereferenceableBytes(), llvm::Attribute::getDereferenceableOrNullBytes(), llvm::Attribute::getMemoryEffects(), llvm::Attribute::getNoFPClass(), llvm::Attribute::getStackAlignment(), llvm::Attribute::getUWTableKind(), llvm::Attribute::getValueAsInt(), llvm::Attribute::getVScaleRangeMax(), llvm::Attribute::getVScaleRangeMin(), and Profile().
StringRef AttributeImpl::getValueAsString | ( | ) | const |
Definition at line 832 of file Attributes.cpp.
References assert(), and isStringAttribute().
Referenced by cmp(), llvm::Attribute::getAsString(), getValueAsBool(), llvm::Attribute::getValueAsString(), and Profile().
Type * AttributeImpl::getValueAsType | ( | ) | const |
Definition at line 837 of file Attributes.cpp.
References assert(), and isTypeAttribute().
Referenced by llvm::Attribute::getValueAsType(), and Profile().
bool AttributeImpl::hasAttribute | ( | Attribute::AttrKind | A | ) | const |
Definition at line 801 of file Attributes.cpp.
References A, getKindAsEnum(), and isStringAttribute().
Referenced by llvm::Attribute::hasAttribute().
Definition at line 806 of file Attributes.cpp.
References getKindAsString(), and isStringAttribute().
|
inline |
Definition at line 66 of file AttributeImpl.h.
References ConstantRangeAttrEntry.
Referenced by cmp(), getKindAsEnum(), getValueAsConstantRange(), llvm::Attribute::isConstantRangeAttribute(), and Profile().
|
inline |
Definition at line 69 of file AttributeImpl.h.
References ConstantRangeListAttrEntry.
Referenced by cmp(), getKindAsEnum(), getValueAsConstantRangeList(), and llvm::Attribute::isConstantRangeListAttribute().
|
inline |
Definition at line 62 of file AttributeImpl.h.
References EnumAttrEntry.
Referenced by cmp(), getKindAsEnum(), llvm::Attribute::isEnumAttribute(), and Profile().
|
inline |
Definition at line 63 of file AttributeImpl.h.
References IntAttrEntry.
Referenced by cmp(), getKindAsEnum(), getValueAsInt(), llvm::Attribute::isIntAttribute(), and Profile().
|
inline |
Definition at line 64 of file AttributeImpl.h.
References StringAttrEntry.
Referenced by cmp(), getKindAsString(), getValueAsString(), hasAttribute(), llvm::Attribute::isStringAttribute(), and Profile().
|
inline |
Definition at line 65 of file AttributeImpl.h.
References TypeAttrEntry.
Referenced by cmp(), getKindAsEnum(), getValueAsType(), llvm::Attribute::isTypeAttribute(), and Profile().
bool AttributeImpl::operator< | ( | const AttributeImpl & | AI | ) | const |
|
delete |
|
inline |
Definition at line 95 of file AttributeImpl.h.
References getKindAsEnum(), getKindAsString(), getValueAsConstantRange(), getValueAsConstantRangeList(), getValueAsInt(), getValueAsString(), getValueAsType(), isConstantRangeAttribute(), isEnumAttribute(), isIntAttribute(), isStringAttribute(), isTypeAttribute(), and Profile.
Referenced by llvm::Attribute::hasParentContext().
|
inlinestatic |
Definition at line 110 of file AttributeImpl.h.
References assert(), and llvm::Attribute::isEnumAttrKind().
|
inlinestatic |
Definition at line 140 of file AttributeImpl.h.
References llvm::ArrayRef< T >::size().
|
inlinestatic |
Definition at line 133 of file AttributeImpl.h.
References llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), and llvm::APInt::Profile().
|
inlinestatic |
Definition at line 127 of file AttributeImpl.h.
|
inlinestatic |
Definition at line 115 of file AttributeImpl.h.
References assert(), and llvm::Attribute::isIntAttrKind().
|
inlinestatic |
Definition at line 122 of file AttributeImpl.h.
References llvm::StringRef::empty().