LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::AttributeList Class Reference

#include "llvm/IR/Attributes.h"

Classes

struct  index_iterator
 

Public Types

enum  AttrIndex : unsigned { ReturnIndex = 0U , FunctionIndex = ~0U , FirstArgIndex = 1 }
 
using iterator = const AttributeSet *
 

Public Member Functions

 AttributeList ()=default
 
AttributeList addAttributeAtIndex (LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const
 Add an attribute to the attribute set at the given index.
 
AttributeList addAttributeAtIndex (LLVMContext &C, unsigned Index, StringRef Kind, StringRef Value=StringRef()) const
 Add an attribute to the attribute set at the given index.
 
AttributeList addAttributeAtIndex (LLVMContext &C, unsigned Index, Attribute A) const
 Add an attribute to the attribute set at the given index.
 
AttributeList addAttributesAtIndex (LLVMContext &C, unsigned Index, const AttrBuilder &B) const
 Add attributes to the attribute set at the given index.
 
AttributeList addFnAttribute (LLVMContext &C, Attribute::AttrKind Kind) const
 Add a function attribute to the list.
 
AttributeList addFnAttribute (LLVMContext &C, Attribute Attr) const
 Add a function attribute to the list.
 
AttributeList addFnAttribute (LLVMContext &C, StringRef Kind, StringRef Value=StringRef()) const
 Add a function attribute to the list.
 
AttributeList addFnAttributes (LLVMContext &C, const AttrBuilder &B) const
 Add function attribute to the list.
 
AttributeList addRetAttribute (LLVMContext &C, Attribute::AttrKind Kind) const
 Add a return value attribute to the list.
 
AttributeList addRetAttribute (LLVMContext &C, Attribute Attr) const
 Add a return value attribute to the list.
 
AttributeList addRetAttributes (LLVMContext &C, const AttrBuilder &B) const
 Add a return value attribute to the list.
 
AttributeList addParamAttribute (LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const
 Add an argument attribute to the list.
 
AttributeList addParamAttribute (LLVMContext &C, unsigned ArgNo, StringRef Kind, StringRef Value=StringRef()) const
 Add an argument attribute to the list.
 
AttributeList addParamAttribute (LLVMContext &C, ArrayRef< unsigned > ArgNos, Attribute A) const
 Add an attribute to the attribute list at the given arg indices.
 
AttributeList addParamAttributes (LLVMContext &C, unsigned ArgNo, const AttrBuilder &B) const
 Add an argument attribute to the list.
 
AttributeList removeAttributeAtIndex (LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const
 Remove the specified attribute at the specified index from this attribute list.
 
AttributeList removeAttributeAtIndex (LLVMContext &C, unsigned Index, StringRef Kind) const
 Remove the specified attribute at the specified index from this attribute list.
 
AttributeList removeAttribute (LLVMContext &C, unsigned Index, StringRef Kind) const
 
AttributeList removeAttributesAtIndex (LLVMContext &C, unsigned Index, const AttributeMask &AttrsToRemove) const
 Remove the specified attributes at the specified index from this attribute list.
 
AttributeList removeAttributesAtIndex (LLVMContext &C, unsigned Index) const
 Remove all attributes at the specified index from this attribute list.
 
AttributeList removeFnAttribute (LLVMContext &C, Attribute::AttrKind Kind) const
 Remove the specified attribute at the function index from this attribute list.
 
AttributeList removeFnAttribute (LLVMContext &C, StringRef Kind) const
 Remove the specified attribute at the function index from this attribute list.
 
AttributeList removeFnAttributes (LLVMContext &C, const AttributeMask &AttrsToRemove) const
 Remove the specified attribute at the function index from this attribute list.
 
AttributeList removeFnAttributes (LLVMContext &C) const
 Remove the attributes at the function index from this attribute list.
 
AttributeList removeRetAttribute (LLVMContext &C, Attribute::AttrKind Kind) const
 Remove the specified attribute at the return value index from this attribute list.
 
AttributeList removeRetAttribute (LLVMContext &C, StringRef Kind) const
 Remove the specified attribute at the return value index from this attribute list.
 
AttributeList removeRetAttributes (LLVMContext &C, const AttributeMask &AttrsToRemove) const
 Remove the specified attribute at the return value index from this attribute list.
 
AttributeList removeParamAttribute (LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const
 Remove the specified attribute at the specified arg index from this attribute list.
 
AttributeList removeParamAttribute (LLVMContext &C, unsigned ArgNo, StringRef Kind) const
 Remove the specified attribute at the specified arg index from this attribute list.
 
AttributeList removeParamAttributes (LLVMContext &C, unsigned ArgNo, const AttributeMask &AttrsToRemove) const
 Remove the specified attribute at the specified arg index from this attribute list.
 
AttributeList removeParamAttributes (LLVMContext &C, unsigned ArgNo) const
 Remove all attributes at the specified arg index from this attribute list.
 
AttributeList replaceAttributeTypeAtIndex (LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind, Type *ReplacementTy) const
 Replace the type contained by attribute AttrKind at index ArgNo wih ReplacementTy, preserving all other attributes.
 
AttributeList addDereferenceableRetAttr (LLVMContext &C, uint64_t Bytes) const
 Add the dereferenceable attribute to the attribute set at the given index.
 
AttributeList addDereferenceableParamAttr (LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const
 Add the dereferenceable attribute to the attribute set at the given arg index.
 
AttributeList addDereferenceableOrNullParamAttr (LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const
 Add the dereferenceable_or_null attribute to the attribute set at the given arg index.
 
AttributeList addRangeRetAttr (LLVMContext &C, const ConstantRange &CR) const
 Add the range attribute to the attribute set at the return value index.
 
AttributeList addAllocSizeParamAttr (LLVMContext &C, unsigned ArgNo, unsigned ElemSizeArg, const std::optional< unsigned > &NumElemsArg) const
 Add the allocsize attribute to the attribute set at the given arg index.
 
std::optional< AttributeListintersectWith (LLVMContext &C, AttributeList Other) const
 Try to intersect this AttributeList with Other.
 
AttributeSet getAttributes (unsigned Index) const
 The attributes for the specified index are returned.
 
AttributeSet getParamAttrs (unsigned ArgNo) const
 The attributes for the argument or parameter at the given index are returned.
 
AttributeSet getRetAttrs () const
 The attributes for the ret value are returned.
 
AttributeSet getFnAttrs () const
 The function attributes are returned.
 
bool hasAttributeAtIndex (unsigned Index, Attribute::AttrKind Kind) const
 Return true if the attribute exists at the given index.
 
bool hasAttributeAtIndex (unsigned Index, StringRef Kind) const
 Return true if the attribute exists at the given index.
 
bool hasAttributesAtIndex (unsigned Index) const
 Return true if attribute exists at the given index.
 
bool hasParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) const
 Return true if the attribute exists for the given argument.
 
bool hasParamAttr (unsigned ArgNo, StringRef Kind) const
 Return true if the attribute exists for the given argument.
 
bool hasParamAttrs (unsigned ArgNo) const
 Return true if attributes exists for the given argument.
 
bool hasRetAttr (Attribute::AttrKind Kind) const
 Return true if the attribute exists for the return value.
 
bool hasRetAttr (StringRef Kind) const
 Return true if the attribute exists for the return value.
 
bool hasRetAttrs () const
 Return true if attributes exist for the return value.
 
bool hasFnAttr (Attribute::AttrKind Kind) const
 Return true if the attribute exists for the function.
 
bool hasFnAttr (StringRef Kind) const
 Return true if the attribute exists for the function.
 
bool hasFnAttrs () const
 Return true the attributes exist for the function.
 
bool hasAttrSomewhere (Attribute::AttrKind Kind, unsigned *Index=nullptr) const
 Return true if the specified attribute is set for at least one parameter or for the return value.
 
Attribute getAttributeAtIndex (unsigned Index, Attribute::AttrKind Kind) const
 Return the attribute object that exists at the given index.
 
Attribute getAttributeAtIndex (unsigned Index, StringRef Kind) const
 Return the attribute object that exists at the given index.
 
Attribute getParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) const
 Return the attribute object that exists at the arg index.
 
Attribute getParamAttr (unsigned ArgNo, StringRef Kind) const
 Return the attribute object that exists at the given index.
 
Attribute getFnAttr (Attribute::AttrKind Kind) const
 Return the attribute object that exists for the function.
 
Attribute getFnAttr (StringRef Kind) const
 Return the attribute object that exists for the function.
 
Attribute getRetAttr (Attribute::AttrKind Kind) const
 Return the attribute for the given attribute kind for the return value.
 
MaybeAlign getRetAlignment () const
 Return the alignment of the return value.
 
MaybeAlign getParamAlignment (unsigned ArgNo) const
 Return the alignment for the specified function parameter.
 
MaybeAlign getParamStackAlignment (unsigned ArgNo) const
 Return the stack alignment for the specified function parameter.
 
TypegetParamByValType (unsigned ArgNo) const
 Return the byval type for the specified function parameter.
 
TypegetParamStructRetType (unsigned ArgNo) const
 Return the sret type for the specified function parameter.
 
TypegetParamByRefType (unsigned ArgNo) const
 Return the byref type for the specified function parameter.
 
TypegetParamPreallocatedType (unsigned ArgNo) const
 Return the preallocated type for the specified function parameter.
 
TypegetParamInAllocaType (unsigned ArgNo) const
 Return the inalloca type for the specified function parameter.
 
TypegetParamElementType (unsigned ArgNo) const
 Return the elementtype type for the specified function parameter.
 
MaybeAlign getFnStackAlignment () const
 Get the stack alignment of the function.
 
MaybeAlign getRetStackAlignment () const
 Get the stack alignment of the return value.
 
uint64_t getRetDereferenceableBytes () const
 Get the number of dereferenceable bytes (or zero if unknown) of the return value.
 
uint64_t getParamDereferenceableBytes (unsigned Index) const
 Get the number of dereferenceable bytes (or zero if unknown) of an arg.
 
uint64_t getRetDereferenceableOrNullBytes () const
 Get the number of dereferenceable_or_null bytes (or zero if unknown) of the return value.
 
uint64_t getParamDereferenceableOrNullBytes (unsigned ArgNo) const
 Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg.
 
std::optional< ConstantRangegetParamRange (unsigned ArgNo) const
 Get range (or std::nullopt if unknown) of an arg.
 
FPClassTest getRetNoFPClass () const
 Get the disallowed floating-point classes of the return value.
 
FPClassTest getParamNoFPClass (unsigned ArgNo) const
 Get the disallowed floating-point classes of the argument value.
 
UWTableKind getUWTableKind () const
 Get the unwind table kind requested for the function.
 
AllocFnKind getAllocKind () const
 
MemoryEffects getMemoryEffects () const
 Returns memory effects of the function.
 
std::string getAsString (unsigned Index, bool InAttrGrp=false) const
 Return the attributes at the index as a string.
 
bool hasParentContext (LLVMContext &C) const
 Return true if this attribute list belongs to the LLVMContext.
 
iterator begin () const
 
iterator end () const
 
unsigned getNumAttrSets () const
 
index_iterator indexes () const
 Use this to iterate over the valid attribute indexes.
 
bool operator== (const AttributeList &RHS) const
 operator==/!= - Provide equality predicates.
 
bool operator!= (const AttributeList &RHS) const
 
void * getRawPointer () const
 Return a raw pointer that uniquely identifies this attribute list.
 
bool isEmpty () const
 Return true if there are no attributes.
 
void print (raw_ostream &O) const
 
void dump () const
 

Static Public Member Functions

static AttributeList get (LLVMContext &C, ArrayRef< std::pair< unsigned, Attribute > > Attrs)
 Create an AttributeList with the specified parameters in it.
 
static AttributeList get (LLVMContext &C, ArrayRef< std::pair< unsigned, AttributeSet > > Attrs)
 
static AttributeList get (LLVMContext &C, AttributeSet FnAttrs, AttributeSet RetAttrs, ArrayRef< AttributeSet > ArgAttrs)
 Create an AttributeList from attribute sets for a function, its return value, and all of its arguments.
 
static AttributeList get (LLVMContext &C, ArrayRef< AttributeList > Attrs)
 Return an AttributeList with the specified parameters in it.
 
static AttributeList get (LLVMContext &C, unsigned Index, ArrayRef< Attribute::AttrKind > Kinds)
 
static AttributeList get (LLVMContext &C, unsigned Index, ArrayRef< Attribute::AttrKind > Kinds, ArrayRef< uint64_t > Values)
 
static AttributeList get (LLVMContext &C, unsigned Index, ArrayRef< StringRef > Kind)
 
static AttributeList get (LLVMContext &C, unsigned Index, AttributeSet Attrs)
 
static AttributeList get (LLVMContext &C, unsigned Index, const AttrBuilder &B)
 

Friends

class AttrBuilder
 
class AttributeListImpl
 
class AttributeSet
 
class AttributeSetNode
 
template<typename Ty , typename Enable >
struct DenseMapInfo
 

Detailed Description

Definition at line 486 of file Attributes.h.

Member Typedef Documentation

◆ iterator

Definition at line 977 of file Attributes.h.

Member Enumeration Documentation

◆ AttrIndex

Enumerator
ReturnIndex 
FunctionIndex 
FirstArgIndex 

Definition at line 488 of file Attributes.h.

Constructor & Destructor Documentation

◆ AttributeList()

llvm::AttributeList::AttributeList ( )
default

Member Function Documentation

◆ addAllocSizeParamAttr()

AttributeList AttributeList::addAllocSizeParamAttr ( LLVMContext C,
unsigned  ArgNo,
unsigned  ElemSizeArg,
const std::optional< unsigned > &  NumElemsArg 
) const

Add the allocsize attribute to the attribute set at the given arg index.

Returns a new list because attribute lists are immutable.

Definition at line 1789 of file Attributes.cpp.

References addParamAttributes(), B, and llvm::CallingConv::C.

◆ addAttributeAtIndex() [1/3]

AttributeList AttributeList::addAttributeAtIndex ( LLVMContext C,
unsigned  Index,
Attribute  A 
) const

Add an attribute to the attribute set at the given index.

Returns a new list because attribute lists are immutable.

Definition at line 1661 of file Attributes.cpp.

References A, addAttributesAtIndex(), B, and llvm::CallingConv::C.

◆ addAttributeAtIndex() [2/3]

AttributeList AttributeList::addAttributeAtIndex ( LLVMContext C,
unsigned  Index,
Attribute::AttrKind  Kind 
) const

Add an attribute to the attribute set at the given index.

Returns a new list because attribute lists are immutable.

Definition at line 1642 of file Attributes.cpp.

References llvm::CallingConv::C, llvm::AttributeSet::get(), llvm::Attribute::get(), getAttributes(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced by llvm::CallBase::addAttributeAtIndex(), addFnAttribute(), addParamAttribute(), and addRetAttribute().

◆ addAttributeAtIndex() [3/3]

AttributeList AttributeList::addAttributeAtIndex ( LLVMContext C,
unsigned  Index,
StringRef  Kind,
StringRef  Value = StringRef() 
) const

Add an attribute to the attribute set at the given index.

Returns a new list because attribute lists are immutable.

Definition at line 1653 of file Attributes.cpp.

References addAttributesAtIndex(), B, and llvm::CallingConv::C.

◆ addAttributesAtIndex()

AttributeList AttributeList::addAttributesAtIndex ( LLVMContext C,
unsigned  Index,
const AttrBuilder B 
) const

Add attributes to the attribute set at the given index.

Returns a new list because attribute lists are immutable.

Definition at line 1685 of file Attributes.cpp.

References B, llvm::CallingConv::C, get(), llvm::AttributeSet::get(), and getAttributes().

Referenced by addAttributeAtIndex(), addFnAttributes(), addParamAttributes(), and addRetAttributes().

◆ addDereferenceableOrNullParamAttr()

AttributeList AttributeList::addDereferenceableOrNullParamAttr ( LLVMContext C,
unsigned  ArgNo,
uint64_t  Bytes 
) const

Add the dereferenceable_or_null attribute to the attribute set at the given arg index.

Returns a new list because attribute lists are immutable.

Definition at line 1775 of file Attributes.cpp.

References addParamAttributes(), B, and llvm::CallingConv::C.

◆ addDereferenceableParamAttr()

AttributeList AttributeList::addDereferenceableParamAttr ( LLVMContext C,
unsigned  ArgNo,
uint64_t  Bytes 
) const

Add the dereferenceable attribute to the attribute set at the given arg index.

Returns a new list because attribute lists are immutable.

Definition at line 1766 of file Attributes.cpp.

References addParamAttributes(), B, and llvm::CallingConv::C.

Referenced by llvm::CallBase::addDereferenceableParamAttr().

◆ addDereferenceableRetAttr()

AttributeList AttributeList::addDereferenceableRetAttr ( LLVMContext C,
uint64_t  Bytes 
) const

Add the dereferenceable attribute to the attribute set at the given index.

Returns a new list because attribute lists are immutable.

Definition at line 1759 of file Attributes.cpp.

References addRetAttributes(), B, and llvm::CallingConv::C.

Referenced by llvm::CallBase::addDereferenceableRetAttr().

◆ addFnAttribute() [1/3]

AttributeList llvm::AttributeList::addFnAttribute ( LLVMContext C,
Attribute  Attr 
) const
inline

Add a function attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 580 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and FunctionIndex.

◆ addFnAttribute() [2/3]

AttributeList llvm::AttributeList::addFnAttribute ( LLVMContext C,
Attribute::AttrKind  Kind 
) const
inline

Add a function attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 573 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and FunctionIndex.

Referenced by llvm::CallBase::addFnAttr(), emitTPIDR2Save(), and llvm::AMDGPULibFunc::getOrInsertFunction().

◆ addFnAttribute() [3/3]

AttributeList llvm::AttributeList::addFnAttribute ( LLVMContext C,
StringRef  Kind,
StringRef  Value = StringRef() 
) const
inline

Add a function attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 588 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and FunctionIndex.

◆ addFnAttributes()

AttributeList llvm::AttributeList::addFnAttributes ( LLVMContext C,
const AttrBuilder B 
) const
inline

Add function attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 595 of file Attributes.h.

References addAttributesAtIndex(), B, llvm::CallingConv::C, and FunctionIndex.

Referenced by llvm::OpenMPIRBuilder::createReductionsGPU(), and legalizeCallAttributes().

◆ addParamAttribute() [1/3]

AttributeList AttributeList::addParamAttribute ( LLVMContext C,
ArrayRef< unsigned ArgNos,
Attribute  A 
) const

Add an attribute to the attribute list at the given arg indices.

Returns a new list because attribute lists are immutable.

Definition at line 1699 of file Attributes.cpp.

References A, assert(), attrIdxToArrayIdx(), B, llvm::ArrayRef< T >::back(), begin(), llvm::CallingConv::C, end(), FirstArgIndex, llvm::AttributeSet::get(), llvm::is_sorted(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorBase< Size_T >::size().

◆ addParamAttribute() [2/3]

AttributeList llvm::AttributeList::addParamAttribute ( LLVMContext C,
unsigned  ArgNo,
Attribute::AttrKind  Kind 
) const
inline

Add an argument attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 624 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and FirstArgIndex.

Referenced by llvm::CallBase::addParamAttr(), and processCallSite().

◆ addParamAttribute() [3/3]

AttributeList llvm::AttributeList::addParamAttribute ( LLVMContext C,
unsigned  ArgNo,
StringRef  Kind,
StringRef  Value = StringRef() 
) const
inline

Add an argument attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 632 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and FirstArgIndex.

◆ addParamAttributes()

AttributeList llvm::AttributeList::addParamAttributes ( LLVMContext C,
unsigned  ArgNo,
const AttrBuilder B 
) const
inline

Add an argument attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 645 of file Attributes.h.

References addAttributesAtIndex(), B, llvm::CallingConv::C, and FirstArgIndex.

Referenced by addAllocSizeParamAttr(), addDereferenceableOrNullParamAttr(), addDereferenceableParamAttr(), and legalizeCallAttributes().

◆ addRangeRetAttr()

AttributeList AttributeList::addRangeRetAttr ( LLVMContext C,
const ConstantRange CR 
) const

Add the range attribute to the attribute set at the return value index.

Returns a new list because attribute lists are immutable.

Definition at line 1782 of file Attributes.cpp.

References addRetAttributes(), B, and llvm::CallingConv::C.

Referenced by llvm::CallBase::addRangeRetAttr().

◆ addRetAttribute() [1/2]

AttributeList llvm::AttributeList::addRetAttribute ( LLVMContext C,
Attribute  Attr 
) const
inline

Add a return value attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 609 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and ReturnIndex.

◆ addRetAttribute() [2/2]

AttributeList llvm::AttributeList::addRetAttribute ( LLVMContext C,
Attribute::AttrKind  Kind 
) const
inline

Add a return value attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 602 of file Attributes.h.

References addAttributeAtIndex(), llvm::CallingConv::C, and ReturnIndex.

Referenced by llvm::CallBase::addRetAttr().

◆ addRetAttributes()

AttributeList llvm::AttributeList::addRetAttributes ( LLVMContext C,
const AttrBuilder B 
) const
inline

Add a return value attribute to the list.

Returns a new list because attribute lists are immutable.

Definition at line 616 of file Attributes.h.

References addAttributesAtIndex(), B, llvm::CallingConv::C, and ReturnIndex.

Referenced by addDereferenceableRetAttr(), addRangeRetAttr(), and AddReturnAttributes().

◆ begin()

AttributeList::iterator AttributeList::begin ( ) const

Definition at line 1981 of file Attributes.cpp.

Referenced by addParamAttribute().

◆ dump()

LLVM_DUMP_METHOD void AttributeList::dump ( ) const

Definition at line 2021 of file Attributes.cpp.

References llvm::dbgs(), and print().

◆ end()

AttributeList::iterator AttributeList::end ( ) const

Definition at line 1985 of file Attributes.cpp.

Referenced by addParamAttribute().

◆ get() [1/9]

AttributeList AttributeList::get ( LLVMContext C,
ArrayRef< AttributeList Attrs 
)
static

Return an AttributeList with the specified parameters in it.

Definition at line 1615 of file Attributes.cpp.

References AttrBuilder, llvm::CallingConv::C, llvm::AttributeSet::get(), I, llvm::List, and llvm::AttrBuilder::merge().

◆ get() [2/9]

AttributeList AttributeList::get ( LLVMContext C,
ArrayRef< std::pair< unsigned, Attribute > >  Attrs 
)
static

◆ get() [3/9]

AttributeList AttributeList::get ( LLVMContext C,
ArrayRef< std::pair< unsigned, AttributeSet > >  Attrs 
)
static

◆ get() [4/9]

AttributeList AttributeList::get ( LLVMContext C,
AttributeSet  FnAttrs,
AttributeSet  RetAttrs,
ArrayRef< AttributeSet ArgAttrs 
)
static

◆ get() [5/9]

AttributeList AttributeList::get ( LLVMContext C,
unsigned  Index,
ArrayRef< Attribute::AttrKind Kinds 
)
static

Definition at line 1588 of file Attributes.cpp.

References llvm::CallingConv::C, get(), and llvm::Attribute::get().

◆ get() [6/9]

AttributeList AttributeList::get ( LLVMContext C,
unsigned  Index,
ArrayRef< Attribute::AttrKind Kinds,
ArrayRef< uint64_t Values 
)
static

◆ get() [7/9]

AttributeList AttributeList::get ( LLVMContext C,
unsigned  Index,
ArrayRef< StringRef Kind 
)
static

Definition at line 1607 of file Attributes.cpp.

References llvm::CallingConv::C, get(), and llvm::Attribute::get().

◆ get() [8/9]

AttributeList AttributeList::get ( LLVMContext C,
unsigned  Index,
AttributeSet  Attrs 
)
static

Definition at line 1573 of file Attributes.cpp.

References attrIdxToArrayIdx(), and llvm::CallingConv::C.

◆ get() [9/9]

AttributeList AttributeList::get ( LLVMContext C,
unsigned  Index,
const AttrBuilder B 
)
static

Definition at line 1583 of file Attributes.cpp.

References B, llvm::CallingConv::C, get(), and llvm::AttributeSet::get().

◆ getAllocKind()

AllocFnKind AttributeList::getAllocKind ( ) const

Definition at line 1954 of file Attributes.cpp.

References llvm::AttributeSet::getAllocKind(), and getFnAttrs().

◆ getAsString()

std::string AttributeList::getAsString ( unsigned  Index,
bool  InAttrGrp = false 
) const

Return the attributes at the index as a string.

Definition at line 1962 of file Attributes.cpp.

References llvm::AttributeSet::getAsString(), and getAttributes().

Referenced by print().

◆ getAttributeAtIndex() [1/2]

Attribute AttributeList::getAttributeAtIndex ( unsigned  Index,
Attribute::AttrKind  Kind 
) const

Return the attribute object that exists at the given index.

Definition at line 1863 of file Attributes.cpp.

References llvm::AttributeSet::getAttribute(), and getAttributes().

Referenced by llvm::CallBase::getAttributeAtIndex(), getFnAttr(), getParamAttr(), getRetAttr(), and replaceAttributeTypeAtIndex().

◆ getAttributeAtIndex() [2/2]

Attribute AttributeList::getAttributeAtIndex ( unsigned  Index,
StringRef  Kind 
) const

Return the attribute object that exists at the given index.

Definition at line 1868 of file Attributes.cpp.

References llvm::AttributeSet::getAttribute(), and getAttributes().

◆ getAttributes()

AttributeSet AttributeList::getAttributes ( unsigned  Index) const

◆ getFnAttr() [1/2]

Attribute llvm::AttributeList::getFnAttr ( Attribute::AttrKind  Kind) const
inline

Return the attribute object that exists for the function.

Definition at line 888 of file Attributes.h.

References FunctionIndex, and getAttributeAtIndex().

Referenced by getDeoptLowering(), llvm::CallBase::getFnAttr(), llvm::HexagonTargetMachine::getSubtargetImpl(), and llvm::parseStatepointDirectivesFromAttrs().

◆ getFnAttr() [2/2]

Attribute llvm::AttributeList::getFnAttr ( StringRef  Kind) const
inline

Return the attribute object that exists for the function.

Definition at line 893 of file Attributes.h.

References FunctionIndex, and getAttributeAtIndex().

◆ getFnAttrs()

AttributeSet AttributeList::getFnAttrs ( ) const

◆ getFnStackAlignment()

MaybeAlign AttributeList::getFnStackAlignment ( ) const

Get the stack alignment of the function.

Definition at line 1909 of file Attributes.cpp.

References getFnAttrs(), and llvm::AttributeSet::getStackAlignment().

Referenced by llvm::Function::getFnStackAlign().

◆ getMemoryEffects()

MemoryEffects AttributeList::getMemoryEffects ( ) const

Returns memory effects of the function.

Definition at line 1958 of file Attributes.cpp.

References getFnAttrs(), and llvm::AttributeSet::getMemoryEffects().

Referenced by llvm::CallBase::getMemoryEffects(), and llvm::SITargetLowering::getTgtMemIntrinsic().

◆ getNumAttrSets()

unsigned AttributeList::getNumAttrSets ( ) const

Definition at line 1993 of file Attributes.cpp.

Referenced by getAttributes(), indexes(), intersectWith(), and removeAttributesAtIndex().

◆ getParamAlignment()

MaybeAlign AttributeList::getParamAlignment ( unsigned  ArgNo) const

Return the alignment for the specified function parameter.

Definition at line 1877 of file Attributes.cpp.

References FirstArgIndex, llvm::AttributeSet::getAlignment(), and getAttributes().

Referenced by llvm::Function::getParamAlign(), and llvm::CallBase::getParamAlign().

◆ getParamAttr() [1/2]

Attribute llvm::AttributeList::getParamAttr ( unsigned  ArgNo,
Attribute::AttrKind  Kind 
) const
inline

Return the attribute object that exists at the arg index.

Definition at line 878 of file Attributes.h.

References FirstArgIndex, and getAttributeAtIndex().

Referenced by llvm::CallBase::getParamAttr().

◆ getParamAttr() [2/2]

Attribute llvm::AttributeList::getParamAttr ( unsigned  ArgNo,
StringRef  Kind 
) const
inline

Return the attribute object that exists at the given index.

Definition at line 883 of file Attributes.h.

References FirstArgIndex, and getAttributeAtIndex().

◆ getParamAttrs()

AttributeSet AttributeList::getParamAttrs ( unsigned  ArgNo) const

◆ getParamByRefType()

Type * AttributeList::getParamByRefType ( unsigned  ArgNo) const

Return the byref type for the specified function parameter.

Definition at line 1893 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getByRefType().

Referenced by llvm::Function::getParamByRefType(), and llvm::CallBase::getParamByRefType().

◆ getParamByValType()

Type * AttributeList::getParamByValType ( unsigned  ArgNo) const

Return the byval type for the specified function parameter.

Definition at line 1885 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getByValType().

Referenced by llvm::Function::getParamByValType(), and llvm::CallBase::getParamByValType().

◆ getParamDereferenceableBytes()

uint64_t AttributeList::getParamDereferenceableBytes ( unsigned  Index) const

Get the number of dereferenceable bytes (or zero if unknown) of an arg.

Definition at line 1921 of file Attributes.cpp.

References llvm::AttributeSet::getDereferenceableBytes(), and getParamAttrs().

Referenced by llvm::Function::getParamDereferenceableBytes(), and llvm::CallBase::getParamDereferenceableBytes().

◆ getParamDereferenceableOrNullBytes()

uint64_t AttributeList::getParamDereferenceableOrNullBytes ( unsigned  ArgNo) const

Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg.

Definition at line 1930 of file Attributes.cpp.

References llvm::AttributeSet::getDereferenceableOrNullBytes(), and getParamAttrs().

Referenced by llvm::Function::getParamDereferenceableOrNullBytes(), and llvm::CallBase::getParamDereferenceableOrNullBytes().

◆ getParamElementType()

Type * AttributeList::getParamElementType ( unsigned  ArgNo) const

Return the elementtype type for the specified function parameter.

Definition at line 1905 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getElementType().

Referenced by llvm::CallBase::getParamElementType().

◆ getParamInAllocaType()

Type * AttributeList::getParamInAllocaType ( unsigned  ArgNo) const

Return the inalloca type for the specified function parameter.

Definition at line 1901 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getInAllocaType().

Referenced by llvm::Function::getParamInAllocaType(), and llvm::CallBase::getParamInAllocaType().

◆ getParamNoFPClass()

FPClassTest AttributeList::getParamNoFPClass ( unsigned  ArgNo) const

Get the disallowed floating-point classes of the argument value.

Definition at line 1946 of file Attributes.cpp.

References llvm::AttributeSet::getNoFPClass(), and getParamAttrs().

Referenced by llvm::Function::getParamNoFPClass(), and llvm::CallBase::getParamNoFPClass().

◆ getParamPreallocatedType()

Type * AttributeList::getParamPreallocatedType ( unsigned  ArgNo) const

Return the preallocated type for the specified function parameter.

Definition at line 1897 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getPreallocatedType().

Referenced by llvm::Function::getParamPreallocatedType(), and llvm::CallBase::getParamPreallocatedType().

◆ getParamRange()

std::optional< ConstantRange > AttributeList::getParamRange ( unsigned  ArgNo) const

Get range (or std::nullopt if unknown) of an arg.

Definition at line 1935 of file Attributes.cpp.

References llvm::AttributeSet::getAttribute(), getParamAttrs(), and llvm::Attribute::getRange().

◆ getParamStackAlignment()

MaybeAlign AttributeList::getParamStackAlignment ( unsigned  ArgNo) const

Return the stack alignment for the specified function parameter.

Definition at line 1881 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getStackAlignment().

Referenced by llvm::Function::getParamStackAlign(), and llvm::CallBase::getParamStackAlign().

◆ getParamStructRetType()

Type * AttributeList::getParamStructRetType ( unsigned  ArgNo) const

Return the sret type for the specified function parameter.

Definition at line 1889 of file Attributes.cpp.

References FirstArgIndex, getAttributes(), and llvm::AttributeSet::getStructRetType().

Referenced by llvm::Function::getParamStructRetType(), and llvm::CallBase::getParamStructRetType().

◆ getRawPointer()

void * llvm::AttributeList::getRawPointer ( ) const
inline

Return a raw pointer that uniquely identifies this attribute list.

Definition at line 1016 of file Attributes.h.

◆ getRetAlignment()

MaybeAlign AttributeList::getRetAlignment ( ) const

Return the alignment of the return value.

Definition at line 1873 of file Attributes.cpp.

References llvm::AttributeSet::getAlignment(), getAttributes(), and ReturnIndex.

Referenced by llvm::CallBase::getRetAlign().

◆ getRetAttr()

Attribute llvm::AttributeList::getRetAttr ( Attribute::AttrKind  Kind) const
inline

Return the attribute for the given attribute kind for the return value.

Definition at line 898 of file Attributes.h.

References getAttributeAtIndex(), and ReturnIndex.

Referenced by llvm::CallBase::getRetAttr().

◆ getRetAttrs()

AttributeSet AttributeList::getRetAttrs ( ) const

◆ getRetDereferenceableBytes()

uint64_t AttributeList::getRetDereferenceableBytes ( ) const

Get the number of dereferenceable bytes (or zero if unknown) of the return value.

Definition at line 1917 of file Attributes.cpp.

References llvm::AttributeSet::getDereferenceableBytes(), and getRetAttrs().

Referenced by llvm::CallBase::getRetDereferenceableBytes().

◆ getRetDereferenceableOrNullBytes()

uint64_t AttributeList::getRetDereferenceableOrNullBytes ( ) const

Get the number of dereferenceable_or_null bytes (or zero if unknown) of the return value.

Definition at line 1925 of file Attributes.cpp.

References llvm::AttributeSet::getDereferenceableOrNullBytes(), and getRetAttrs().

Referenced by llvm::CallBase::getRetDereferenceableOrNullBytes().

◆ getRetNoFPClass()

FPClassTest AttributeList::getRetNoFPClass ( ) const

Get the disallowed floating-point classes of the return value.

Definition at line 1942 of file Attributes.cpp.

References llvm::AttributeSet::getNoFPClass(), and getRetAttrs().

Referenced by llvm::CallBase::getRetNoFPClass().

◆ getRetStackAlignment()

MaybeAlign AttributeList::getRetStackAlignment ( ) const

Get the stack alignment of the return value.

Definition at line 1913 of file Attributes.cpp.

References getRetAttrs(), and llvm::AttributeSet::getStackAlignment().

◆ getUWTableKind()

UWTableKind AttributeList::getUWTableKind ( ) const

Get the unwind table kind requested for the function.

Definition at line 1950 of file Attributes.cpp.

References getFnAttrs(), and llvm::AttributeSet::getUWTableKind().

Referenced by llvm::Function::getUWTableKind().

◆ hasAttributeAtIndex() [1/2]

bool AttributeList::hasAttributeAtIndex ( unsigned  Index,
Attribute::AttrKind  Kind 
) const

Return true if the attribute exists at the given index.

Definition at line 1837 of file Attributes.cpp.

References getAttributes(), and llvm::AttributeSet::hasAttribute().

Referenced by hasFnAttr(), hasParamAttr(), and hasRetAttr().

◆ hasAttributeAtIndex() [2/2]

bool AttributeList::hasAttributeAtIndex ( unsigned  Index,
StringRef  Kind 
) const

Return true if the attribute exists at the given index.

Definition at line 1842 of file Attributes.cpp.

References getAttributes(), and llvm::AttributeSet::hasAttribute().

◆ hasAttributesAtIndex()

bool AttributeList::hasAttributesAtIndex ( unsigned  Index) const

Return true if attribute exists at the given index.

Definition at line 1846 of file Attributes.cpp.

References getAttributes(), and llvm::AttributeSet::hasAttributes().

Referenced by hasFnAttrs(), hasParamAttrs(), and hasRetAttrs().

◆ hasAttrSomewhere()

bool AttributeList::hasAttrSomewhere ( Attribute::AttrKind  Kind,
unsigned Index = nullptr 
) const

◆ hasFnAttr() [1/2]

bool AttributeList::hasFnAttr ( Attribute::AttrKind  Kind) const

◆ hasFnAttr() [2/2]

bool AttributeList::hasFnAttr ( StringRef  Kind) const

Return true if the attribute exists for the function.

Definition at line 1854 of file Attributes.cpp.

References FunctionIndex, and hasAttributeAtIndex().

◆ hasFnAttrs()

bool llvm::AttributeList::hasFnAttrs ( ) const
inline

Return true the attributes exist for the function.

Definition at line 863 of file Attributes.h.

References FunctionIndex, and hasAttributesAtIndex().

◆ hasParamAttr() [1/2]

bool llvm::AttributeList::hasParamAttr ( unsigned  ArgNo,
Attribute::AttrKind  Kind 
) const
inline

◆ hasParamAttr() [2/2]

bool llvm::AttributeList::hasParamAttr ( unsigned  ArgNo,
StringRef  Kind 
) const
inline

Return true if the attribute exists for the given argument.

Definition at line 834 of file Attributes.h.

References FirstArgIndex, and hasAttributeAtIndex().

◆ hasParamAttrs()

bool llvm::AttributeList::hasParamAttrs ( unsigned  ArgNo) const
inline

Return true if attributes exists for the given argument.

Definition at line 839 of file Attributes.h.

References FirstArgIndex, and hasAttributesAtIndex().

◆ hasParentContext()

bool AttributeList::hasParentContext ( LLVMContext C) const

Return true if this attribute list belongs to the LLVMContext.

Definition at line 1973 of file Attributes.cpp.

References assert(), llvm::CallingConv::C, and isEmpty().

◆ hasRetAttr() [1/2]

bool llvm::AttributeList::hasRetAttr ( Attribute::AttrKind  Kind) const
inline

Return true if the attribute exists for the return value.

Definition at line 844 of file Attributes.h.

References hasAttributeAtIndex(), and ReturnIndex.

Referenced by llvm::GetReturnInfo(), isLibCallInTailPosition(), llvm::Function::returnDoesNotAlias(), and llvm::CallBase::returnDoesNotAlias().

◆ hasRetAttr() [2/2]

bool llvm::AttributeList::hasRetAttr ( StringRef  Kind) const
inline

Return true if the attribute exists for the return value.

Definition at line 849 of file Attributes.h.

References hasAttributeAtIndex(), and ReturnIndex.

◆ hasRetAttrs()

bool llvm::AttributeList::hasRetAttrs ( ) const
inline

Return true if attributes exist for the return value.

Definition at line 854 of file Attributes.h.

References hasAttributesAtIndex(), and ReturnIndex.

◆ indexes()

index_iterator llvm::AttributeList::indexes ( ) const
inline

Use this to iterate over the valid attribute indexes.

Definition at line 1009 of file Attributes.h.

References getNumAttrSets().

Referenced by print().

◆ intersectWith()

std::optional< AttributeList > AttributeList::intersectWith ( LLVMContext C,
AttributeList  Other 
) const

Try to intersect this AttributeList with Other.

Returns std::nullopt if the two lists are inherently incompatible (imply different behavior, not just analysis).

Definition at line 1798 of file Attributes.cpp.

References llvm::CallingConv::C, get(), getAttributes(), getNumAttrSets(), Idx, llvm::AttributeSet::intersectWith(), llvm::Other, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::sort().

Referenced by llvm::GVNExpression::CallExpression::equals(), and llvm::GVNPass::Expression::operator==().

◆ isEmpty()

bool llvm::AttributeList::isEmpty ( ) const
inline

◆ operator!=()

bool llvm::AttributeList::operator!= ( const AttributeList RHS) const
inline

Definition at line 1013 of file Attributes.h.

References RHS.

◆ operator==()

bool llvm::AttributeList::operator== ( const AttributeList RHS) const
inline

operator==/!= - Provide equality predicates.

Definition at line 1012 of file Attributes.h.

References RHS.

◆ print()

void AttributeList::print ( raw_ostream O) const

Definition at line 1997 of file Attributes.cpp.

References FirstArgIndex, FunctionIndex, getAsString(), getAttributes(), indexes(), and ReturnIndex.

Referenced by dump().

◆ removeAttribute()

AttributeList llvm::AttributeList::removeAttribute ( LLVMContext C,
unsigned  Index,
StringRef  Kind 
) const
inline

Definition at line 660 of file Attributes.h.

References llvm::CallingConv::C, Index, and removeAttributeAtIndex().

◆ removeAttributeAtIndex() [1/2]

AttributeList AttributeList::removeAttributeAtIndex ( LLVMContext C,
unsigned  Index,
Attribute::AttrKind  Kind 
) const

Remove the specified attribute at the specified index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 1720 of file Attributes.cpp.

References llvm::CallingConv::C, and getAttributes().

Referenced by removeAttribute(), llvm::CallBase::removeAttributeAtIndex(), removeFnAttribute(), removeParamAttribute(), removeRetAttribute(), and replaceAttributeTypeAtIndex().

◆ removeAttributeAtIndex() [2/2]

AttributeList AttributeList::removeAttributeAtIndex ( LLVMContext C,
unsigned  Index,
StringRef  Kind 
) const

Remove the specified attribute at the specified index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 1729 of file Attributes.cpp.

References llvm::CallingConv::C, and getAttributes().

◆ removeAttributesAtIndex() [1/2]

AttributeList AttributeList::removeAttributesAtIndex ( LLVMContext C,
unsigned  Index 
) const

Remove all attributes at the specified index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 1750 of file Attributes.cpp.

References AttributeSet, attrIdxToArrayIdx(), llvm::CallingConv::C, and getNumAttrSets().

◆ removeAttributesAtIndex() [2/2]

AttributeList AttributeList::removeAttributesAtIndex ( LLVMContext C,
unsigned  Index,
const AttributeMask AttrsToRemove 
) const

Remove the specified attributes at the specified index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 1739 of file Attributes.cpp.

References llvm::CallingConv::C, and getAttributes().

Referenced by removeFnAttributes(), removeParamAttributes(), and removeRetAttributes().

◆ removeFnAttribute() [1/2]

AttributeList llvm::AttributeList::removeFnAttribute ( LLVMContext C,
Attribute::AttrKind  Kind 
) const
inline

Remove the specified attribute at the function index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 679 of file Attributes.h.

References llvm::CallingConv::C, FunctionIndex, and removeAttributeAtIndex().

Referenced by llvm::CallBase::removeFnAttr().

◆ removeFnAttribute() [2/2]

AttributeList llvm::AttributeList::removeFnAttribute ( LLVMContext C,
StringRef  Kind 
) const
inline

Remove the specified attribute at the function index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 685 of file Attributes.h.

References llvm::CallingConv::C, FunctionIndex, and removeAttributeAtIndex().

◆ removeFnAttributes() [1/2]

AttributeList llvm::AttributeList::removeFnAttributes ( LLVMContext C) const
inline

Remove the attributes at the function index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 699 of file Attributes.h.

References llvm::CallingConv::C, FunctionIndex, and removeAttributesAtIndex().

◆ removeFnAttributes() [2/2]

AttributeList llvm::AttributeList::removeFnAttributes ( LLVMContext C,
const AttributeMask AttrsToRemove 
) const
inline

Remove the specified attribute at the function index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 693 of file Attributes.h.

References llvm::CallingConv::C, FunctionIndex, and removeAttributesAtIndex().

Referenced by llvm::CallBase::removeFnAttrs().

◆ removeParamAttribute() [1/2]

AttributeList llvm::AttributeList::removeParamAttribute ( LLVMContext C,
unsigned  ArgNo,
Attribute::AttrKind  Kind 
) const
inline

Remove the specified attribute at the specified arg index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 728 of file Attributes.h.

References llvm::CallingConv::C, FirstArgIndex, and removeAttributeAtIndex().

Referenced by llvm::CallBase::removeParamAttr().

◆ removeParamAttribute() [2/2]

AttributeList llvm::AttributeList::removeParamAttribute ( LLVMContext C,
unsigned  ArgNo,
StringRef  Kind 
) const
inline

Remove the specified attribute at the specified arg index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 736 of file Attributes.h.

References llvm::CallingConv::C, FirstArgIndex, and removeAttributeAtIndex().

◆ removeParamAttributes() [1/2]

AttributeList llvm::AttributeList::removeParamAttributes ( LLVMContext C,
unsigned  ArgNo 
) const
inline

Remove all attributes at the specified arg index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 750 of file Attributes.h.

References llvm::CallingConv::C, FirstArgIndex, and removeAttributesAtIndex().

◆ removeParamAttributes() [2/2]

AttributeList llvm::AttributeList::removeParamAttributes ( LLVMContext C,
unsigned  ArgNo,
const AttributeMask AttrsToRemove 
) const
inline

Remove the specified attribute at the specified arg index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 743 of file Attributes.h.

References llvm::CallingConv::C, FirstArgIndex, and removeAttributesAtIndex().

Referenced by lowerAwaitSuspend(), and llvm::CallBase::removeParamAttrs().

◆ removeRetAttribute() [1/2]

AttributeList llvm::AttributeList::removeRetAttribute ( LLVMContext C,
Attribute::AttrKind  Kind 
) const
inline

Remove the specified attribute at the return value index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 706 of file Attributes.h.

References llvm::CallingConv::C, removeAttributeAtIndex(), and ReturnIndex.

Referenced by llvm::CallBase::removeRetAttr().

◆ removeRetAttribute() [2/2]

AttributeList llvm::AttributeList::removeRetAttribute ( LLVMContext C,
StringRef  Kind 
) const
inline

Remove the specified attribute at the return value index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 712 of file Attributes.h.

References llvm::CallingConv::C, removeAttributeAtIndex(), and ReturnIndex.

◆ removeRetAttributes()

AttributeList llvm::AttributeList::removeRetAttributes ( LLVMContext C,
const AttributeMask AttrsToRemove 
) const
inline

Remove the specified attribute at the return value index from this attribute list.

Returns a new list because attribute lists are immutable.

Definition at line 720 of file Attributes.h.

References llvm::CallingConv::C, removeAttributesAtIndex(), and ReturnIndex.

Referenced by llvm::CallBase::removeRetAttrs().

◆ replaceAttributeTypeAtIndex()

AttributeList llvm::AttributeList::replaceAttributeTypeAtIndex ( LLVMContext C,
unsigned  ArgNo,
Attribute::AttrKind  Kind,
Type ReplacementTy 
) const
inline

Replace the type contained by attribute AttrKind at index ArgNo wih ReplacementTy, preserving all other attributes.

Definition at line 758 of file Attributes.h.

References llvm::CallingConv::C, getAttributeAtIndex(), llvm::Attribute::getWithNewType(), and removeAttributeAtIndex().

Friends And Related Function Documentation

◆ AttrBuilder

friend class AttrBuilder
friend

Definition at line 495 of file Attributes.h.

Referenced by get().

◆ AttributeListImpl

friend class AttributeListImpl
friend

Definition at line 496 of file Attributes.h.

◆ AttributeSet

friend class AttributeSet
friend

Definition at line 497 of file Attributes.h.

Referenced by removeAttributesAtIndex().

◆ AttributeSetNode

friend class AttributeSetNode
friend

Definition at line 498 of file Attributes.h.

◆ DenseMapInfo

template<typename Ty , typename Enable >
friend struct DenseMapInfo
friend

Definition at line 499 of file Attributes.h.


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