16 #ifndef LLVM_LIB_IR_ATTRIBUTEIMPL_H
17 #define LLVM_LIB_IR_ATTRIBUTEIMPL_H
102 virtual void anchor();
120 void anchor()
override;
125 assert((Kind == Attribute::Alignment || Kind == Attribute::StackAlignment ||
126 Kind == Attribute::Dereferenceable ||
127 Kind == Attribute::DereferenceableOrNull ||
128 Kind == Attribute::AllocSize) &&
129 "Wrong kind for int attribute!");
136 virtual void anchor();
159 uint64_t AvailableAttrs;
169 void operator delete(
void *p) { ::operator
delete(p); }
179 return AvailableAttrs & ((uint64_t)1) <<
Kind;
204 for (
const auto &Attr : AttrList)
223 uint64_t AvailableFunctionAttrs;
225 unsigned NumAttrSets;
228 size_t numTrailingObjects(OverloadToken<AttributeSet>) {
return NumAttrSets; }
237 void operator delete(
void *p) { ::operator
delete(p); }
245 return AvailableFunctionAttrs & ((uint64_t)1) <<
Kind;
261 #endif // LLVM_LIB_IR_ATTRIBUTEIMPL_H
std::pair< unsigned, Optional< unsigned > > getAllocSizeArgs() const
uint64_t getDereferenceableBytes() const
AttributeSetNode & operator=(const AttributeSetNode &)=delete
std::string getAsString(bool InAttrGrp) const
AttributeListImpl & operator=(const AttributeListImpl &)=delete
StringRef getStringValue() const
AttributeListImpl(LLVMContext &C, ArrayRef< AttributeSet > Sets)
StringAttributeImpl(StringRef Kind, StringRef Val=StringRef())
static void Profile(FoldingSetNodeID &ID, ArrayRef< Attribute > AttrList)
bool hasAttributes() const
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
This file contains the simple types necessary to represent the attributes associated with functions a...
Attribute::AttrKind getKindAsEnum() const
void AddInteger(signed I)
EnumAttributeImpl(AttrEntryKind ID, Attribute::AttrKind Kind)
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the AttributeSet or the FunctionIndex has an enum attribute of the given kind...
bool operator<(const AttributeImpl &AI) const
Used when sorting the attributes.
EnumAttributeImpl(Attribute::AttrKind Kind)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
std::pair< unsigned, AttributeSet > IndexAttrPair
StringRef getKindAsString() const
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
void Profile(FoldingSetNodeID &ID) const
StringRef getStringKind() const
This is an important class for using LLVM in a threaded context.
bool isStringAttribute() const
IntAttributeImpl(Attribute::AttrKind Kind, uint64_t Val)
unsigned getAlignment() const
See the file comment for details on the usage of the TrailingObjects type.
StringRef getValueAsString() const
bool isIntAttribute() const
bool hasAttribute(Attribute::AttrKind Kind) const
bool hasAttribute(Attribute::AttrKind A) const
uint64_t getValueAsInt() const
Attribute::AttrKind getEnumKind() const
unsigned getNumAttributes() const
Return the number of attributes this AttributeList contains.
unsigned getStackAlignment() const
uint64_t getValue() const
AttributeImpl(AttrEntryKind KindID)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
static void Profile(FoldingSetNodeID &ID, Attribute::AttrKind Kind, uint64_t Val)
Node - This class is used to maintain the singly linked bucket list in a folding set.
LLVMContext & getContext()
Get the context that created this AttributeListImpl.
bool isEnumAttribute() const
void AddString(StringRef String)
uint64_t getDereferenceableOrNullBytes() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void Profile(FoldingSetNodeID &ID) const
void Profile(FoldingSetNodeID &ID) const
This header defines support for implementing classes that have some trailing object (or arrays of obj...
StringRef - Represent a constant reference to a string, i.e.
Attribute getAttribute(Attribute::AttrKind Kind) const
static void Profile(FoldingSetNodeID &ID, StringRef Kind, StringRef Values)
AttributeImpl & operator=(const AttributeImpl &)=delete
AttrKind
This enumeration lists the attributes that can be associated with parameters, function results...