15 #ifndef LLVM_LIB_IR_ATTRIBUTEIMPL_H 16 #define LLVM_LIB_IR_ATTRIBUTEIMPL_H 114 virtual void anchor();
132 void anchor()
override;
137 assert((Kind == Attribute::Alignment || Kind == Attribute::StackAlignment ||
138 Kind == Attribute::Dereferenceable ||
139 Kind == Attribute::DereferenceableOrNull ||
140 Kind == Attribute::AllocSize) &&
141 "Wrong kind for int attribute!");
148 virtual void anchor();
162 void anchor()
override;
184 uint8_t AvailableAttrs[12] = {};
193 void operator delete(
void *p) { ::operator
delete(p); }
203 return AvailableAttrs[Kind / 8] & ((uint64_t)1) << (Kind % 8);
213 uint64_t getDereferenceableBytes()
const;
214 uint64_t getDereferenceableOrNullBytes()
const;
215 std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs()
const;
216 std::string getAsString(
bool InAttrGrp)
const;
217 Type *getByValType()
const;
229 for (
const auto &Attr : AttrList)
248 unsigned NumAttrSets;
250 uint8_t AvailableFunctionAttrs[12] = {};
253 size_t numTrailingObjects(OverloadToken<AttributeSet>) {
return NumAttrSets; }
262 void operator delete(
void *p) { ::operator
delete(p); }
270 return AvailableFunctionAttrs[Kind / 8] & ((uint64_t)1) << (Kind % 8);
286 #endif // LLVM_LIB_IR_ATTRIBUTEIMPL_H
void AddPointer(const void *Ptr)
Add* - Add various data types to Bit data.
const_iterator end(StringRef path)
Get end iterator over path.
bool hasAttribute(Attribute::AttrKind A) const
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
This class represents lattice values for constants.
void Profile(FoldingSetNodeID &ID) const
StringAttributeImpl(StringRef Kind, StringRef Val=StringRef())
static void Profile(FoldingSetNodeID &ID, ArrayRef< Attribute > AttrList)
static uint32_t getAlignment(const MCSectionCOFF &Sec)
Type * getValueAsType() const
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
unsigned getNumAttributes() const
Return the number of attributes this AttributeList contains.
bool isIntAttribute() const
This file contains the simple types necessary to represent the attributes associated with functions a...
void AddInteger(signed I)
void Profile(FoldingSetNodeID &ID) const
uint64_t getValue() const
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
EnumAttributeImpl(AttrEntryKind ID, Attribute::AttrKind Kind)
EnumAttributeImpl(Attribute::AttrKind Kind)
StringRef getStringValue() const
StringRef getStringKind() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
std::pair< unsigned, AttributeSet > IndexAttrPair
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
Type * getTypeValue() const
static xmlAttrPtr getAttribute(xmlNodePtr Node, const unsigned char *AttributeName)
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
bool isTypeAttribute() const
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
IntAttributeImpl(Attribute::AttrKind Kind, uint64_t Val)
bool isStringAttribute() const
See the file comment for details on the usage of the TrailingObjects type.
Attribute::AttrKind getKindAsEnum() const
bool operator<(const AttributeImpl &AI) const
Used when sorting the attributes.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the AttributeSet or the FunctionIndex has an enum attribute of the given kind...
StringRef getKindAsString() const
static void Profile(FoldingSetNodeID &ID, Attribute::AttrKind Kind, Type *Ty)
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
bool isEnumAttribute() const
AttributeImpl(AttrEntryKind KindID)
bool hasAttribute(Attribute::AttrKind Kind) const
Attribute::AttrKind getEnumKind() const
static void Profile(FoldingSetNodeID &ID, Attribute::AttrKind Kind, uint64_t Val)
bool hasAttributes() const
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.
void AddString(StringRef String)
uint64_t getValueAsInt() const
StringRef getValueAsString() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
TypeAttributeImpl(Attribute::AttrKind Kind, Type *Ty)
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...