LLVM  13.0.0git
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | List of all members
llvm::AttributeImpl Class Reference

#include "IR/AttributeImpl.h"

Inheritance diagram for llvm::AttributeImpl:
Inheritance graph
[legend]
Collaboration diagram for llvm::AttributeImpl:
Collaboration graph
[legend]

Public Member Functions

 AttributeImpl (const AttributeImpl &)=delete
 
AttributeImploperator= (const AttributeImpl &)=delete
 
bool isEnumAttribute () const
 
bool isIntAttribute () const
 
bool isStringAttribute () const
 
bool isTypeAttribute () const
 
bool hasAttribute (Attribute::AttrKind A) const
 
bool hasAttribute (StringRef Kind) const
 
Attribute::AttrKind getKindAsEnum () const
 
uint64_t getValueAsInt () const
 
bool getValueAsBool () const
 
StringRef getKindAsString () const
 
StringRef getValueAsString () const
 
TypegetValueAsType () const
 
bool operator< (const AttributeImpl &AI) const
 Used when sorting the attributes. More...
 
void Profile (FoldingSetNodeID &ID) const
 
- Public Member Functions inherited from llvm::FoldingSetBase::Node
 Node ()=default
 
void * getNextInBucket () const
 
void SetNextInBucket (void *N)
 

Static Public Member Functions

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)
 

Protected Types

enum  AttrEntryKind { EnumAttrEntry, IntAttrEntry, StringAttrEntry, TypeAttrEntry }
 

Protected Member Functions

 AttributeImpl (AttrEntryKind KindID)
 

Detailed Description

Definition at line 39 of file AttributeImpl.h.

Member Enumeration Documentation

◆ AttrEntryKind

Enumerator
EnumAttrEntry 
IntAttrEntry 
StringAttrEntry 
TypeAttrEntry 

Definition at line 43 of file AttributeImpl.h.

Constructor & Destructor Documentation

◆ AttributeImpl() [1/2]

llvm::AttributeImpl::AttributeImpl ( AttrEntryKind  KindID)
inlineprotected

Definition at line 50 of file AttributeImpl.h.

◆ AttributeImpl() [2/2]

llvm::AttributeImpl::AttributeImpl ( const AttributeImpl )
delete

Member Function Documentation

◆ getKindAsEnum()

Attribute::AttrKind AttributeImpl::getKindAsEnum ( ) const

◆ getKindAsString()

StringRef AttributeImpl::getKindAsString ( ) const

Definition at line 665 of file Attributes.cpp.

References assert(), and isStringAttribute().

Referenced by llvm::Attribute::getKindAsString(), hasAttribute(), operator<(), and Profile().

◆ getValueAsBool()

bool AttributeImpl::getValueAsBool ( ) const

Definition at line 660 of file Attributes.cpp.

References assert(), llvm::empty(), and getValueAsString().

Referenced by llvm::Attribute::getValueAsBool().

◆ getValueAsInt()

uint64_t AttributeImpl::getValueAsInt ( ) const

◆ getValueAsString()

StringRef AttributeImpl::getValueAsString ( ) const

◆ getValueAsType()

Type * AttributeImpl::getValueAsType ( ) const

Definition at line 675 of file Attributes.cpp.

References assert(), and isTypeAttribute().

Referenced by llvm::Attribute::getValueAsType(), and Profile().

◆ hasAttribute() [1/2]

bool AttributeImpl::hasAttribute ( Attribute::AttrKind  A) const

Definition at line 640 of file Attributes.cpp.

References A, getKindAsEnum(), and isStringAttribute().

Referenced by llvm::Attribute::hasAttribute().

◆ hasAttribute() [2/2]

bool AttributeImpl::hasAttribute ( StringRef  Kind) const

Definition at line 645 of file Attributes.cpp.

References getKindAsString(), and isStringAttribute().

◆ isEnumAttribute()

bool llvm::AttributeImpl::isEnumAttribute ( ) const
inline

Definition at line 57 of file AttributeImpl.h.

References EnumAttrEntry.

Referenced by getKindAsEnum(), llvm::Attribute::isEnumAttribute(), operator<(), and Profile().

◆ isIntAttribute()

bool llvm::AttributeImpl::isIntAttribute ( ) const
inline

◆ isStringAttribute()

bool llvm::AttributeImpl::isStringAttribute ( ) const
inline

◆ isTypeAttribute()

bool llvm::AttributeImpl::isTypeAttribute ( ) const
inline

◆ operator<()

bool AttributeImpl::operator< ( const AttributeImpl AI) const

◆ operator=()

AttributeImpl& llvm::AttributeImpl::operator= ( const AttributeImpl )
delete

◆ Profile() [1/4]

void llvm::AttributeImpl::Profile ( FoldingSetNodeID ID) const
inline

◆ Profile() [2/4]

static void llvm::AttributeImpl::Profile ( FoldingSetNodeID ID,
Attribute::AttrKind  Kind,
Type Ty 
)
inlinestatic

Definition at line 99 of file AttributeImpl.h.

◆ Profile() [3/4]

static void llvm::AttributeImpl::Profile ( FoldingSetNodeID ID,
Attribute::AttrKind  Kind,
uint64_t  Val 
)
inlinestatic

Definition at line 88 of file AttributeImpl.h.

◆ Profile() [4/4]

static void llvm::AttributeImpl::Profile ( FoldingSetNodeID ID,
StringRef  Kind,
StringRef  Values 
)
inlinestatic

Definition at line 94 of file AttributeImpl.h.

References llvm::StringRef::empty().


The documentation for this class was generated from the following files: