class AttributeSet

Declaration

class AttributeSet { /* full declaration omitted */ };

Description

This class holds the attributes for a particular argument, parameter, function, or return value. It is an immutable value type that is cheap to copy. Adding and removing enum attributes is intended to be fast, but adding and removing string or integer attributes involves a FoldingSet lookup.

Declared at: llvm/include/llvm/IR/Attributes.h:290

Member Variables

private llvm::AttributeSetNode* SetNode = nullptr
Private implementation pointer.

Method Overview

Methods

AttributeSet()

Description

AttributeSet is a trivially copyable value type.

Declared at: llvm/include/llvm/IR/Attributes.h:306

AttributeSet(const llvm::AttributeSet&)

Declared at: llvm/include/llvm/IR/Attributes.h:307

Parameters

const llvm::AttributeSet&

AttributeSet(llvm::AttributeSetNode* ASN)

Declared at: llvm/include/llvm/IR/Attributes.h:302

Parameters

llvm::AttributeSetNode* ASN

llvm::AttributeSet addAttribute(
    llvm::LLVMContext& C,
    Attribute::AttrKind Kind) const

Description

Add an argument attribute. Returns a new set because attribute sets are immutable.

Declared at: llvm/include/llvm/IR/Attributes.h:318

Parameters

llvm::LLVMContext& C
Attribute::AttrKind Kind

llvm::AttributeSet addAttribute(
    llvm::LLVMContext& C,
    llvm::StringRef Kind,
    llvm::StringRef Value =
        llvm::StringRef()) const

Description

Add a target-dependent attribute. Returns a new set because attribute sets are immutable.

Declared at: llvm/include/llvm/IR/Attributes.h:323

Parameters

llvm::LLVMContext& C
llvm::StringRef Kind
llvm::StringRef Value = llvm::StringRef()

llvm::AttributeSet addAttributes(
    llvm::LLVMContext& C,
    llvm::AttributeSet AS) const

Description

Add attributes to the attribute set. Returns a new set because attribute sets are immutable.

Declared at: llvm/include/llvm/IR/Attributes.h:328

Parameters

llvm::LLVMContext& C
llvm::AttributeSet AS

llvm::AttributeSet::iterator begin() const

Declared at: llvm/include/llvm/IR/Attributes.h:386

void dump() const

Declared at: llvm/include/llvm/IR/Attributes.h:389

llvm::AttributeSet::iterator end() const

Declared at: llvm/include/llvm/IR/Attributes.h:387

static llvm::AttributeSet get(
    llvm::LLVMContext& C,
    ArrayRef<llvm::Attribute> Attrs)

Declared at: llvm/include/llvm/IR/Attributes.h:311

Parameters

llvm::LLVMContext& C
ArrayRef<llvm::Attribute> Attrs

static llvm::AttributeSet get(
    llvm::LLVMContext& C,
    const llvm::AttrBuilder& B)

Declared at: llvm/include/llvm/IR/Attributes.h:310

Parameters

llvm::LLVMContext& C
const llvm::AttrBuilder& B

llvm::MaybeAlign getAlignment() const

Declared at: llvm/include/llvm/IR/Attributes.h:364

llvm::AllocFnKind getAllocKind() const

Declared at: llvm/include/llvm/IR/Attributes.h:378

std::pair<unsigned int, Optional<unsigned int>>
getAllocSizeArgs() const

Declared at: llvm/include/llvm/IR/Attributes.h:374

std::string getAsString(
    bool InAttrGrp = false) const

Declared at: llvm/include/llvm/IR/Attributes.h:379

Parameters

bool InAttrGrp = false

llvm::Attribute getAttribute(
    Attribute::AttrKind Kind) const

Description

Return the attribute object.

Declared at: llvm/include/llvm/IR/Attributes.h:359

Parameters

Attribute::AttrKind Kind

llvm::Attribute getAttribute(
    llvm::StringRef Kind) const

Description

Return the target-dependent attribute object.

Declared at: llvm/include/llvm/IR/Attributes.h:362

Parameters

llvm::StringRef Kind

llvm::Type* getByRefType() const

Declared at: llvm/include/llvm/IR/Attributes.h:370

llvm::Type* getByValType() const

Declared at: llvm/include/llvm/IR/Attributes.h:368

uint64_t getDereferenceableBytes() const

Declared at: llvm/include/llvm/IR/Attributes.h:366

uint64_t getDereferenceableOrNullBytes() const

Declared at: llvm/include/llvm/IR/Attributes.h:367

llvm::Type* getElementType() const

Declared at: llvm/include/llvm/IR/Attributes.h:373

llvm::Type* getInAllocaType() const

Declared at: llvm/include/llvm/IR/Attributes.h:372

unsigned int getNumAttributes() const

Description

Return the number of attributes in this set.

Declared at: llvm/include/llvm/IR/Attributes.h:347

llvm::Type* getPreallocatedType() const

Declared at: llvm/include/llvm/IR/Attributes.h:371

llvm::MaybeAlign getStackAlignment() const

Declared at: llvm/include/llvm/IR/Attributes.h:365

llvm::Type* getStructRetType() const

Declared at: llvm/include/llvm/IR/Attributes.h:369

llvm::UWTableKind getUWTableKind() const

Declared at: llvm/include/llvm/IR/Attributes.h:377

Optional<unsigned int> getVScaleRangeMax() const

Declared at: llvm/include/llvm/IR/Attributes.h:376

unsigned int getVScaleRangeMin() const

Declared at: llvm/include/llvm/IR/Attributes.h:375

bool hasAttribute(llvm::StringRef Kind) const

Description

Return true if the attribute exists in this set.

Declared at: llvm/include/llvm/IR/Attributes.h:356

Parameters

llvm::StringRef Kind

bool hasAttribute(Attribute::AttrKind Kind) const

Description

Return true if the attribute exists in this set.

Declared at: llvm/include/llvm/IR/Attributes.h:353

Parameters

Attribute::AttrKind Kind

bool hasAttributes() const

Description

Return true if attributes exists in this set.

Declared at: llvm/include/llvm/IR/Attributes.h:350

bool hasParentContext(llvm::LLVMContext& C) const

Description

Return true if this attribute set belongs to the LLVMContext.

Declared at: llvm/include/llvm/IR/Attributes.h:382

Parameters

llvm::LLVMContext& C

llvm::AttributeSet removeAttribute(
    llvm::LLVMContext& C,
    Attribute::AttrKind Kind) const

Description

Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.

Declared at: llvm/include/llvm/IR/Attributes.h:333

Parameters

llvm::LLVMContext& C
Attribute::AttrKind Kind

llvm::AttributeSet removeAttribute(
    llvm::LLVMContext& C,
    llvm::StringRef Kind) const

Description

Remove the specified attribute from this set. Returns a new set because attribute sets are immutable.

Declared at: llvm/include/llvm/IR/Attributes.h:338

Parameters

llvm::LLVMContext& C
llvm::StringRef Kind

llvm::AttributeSet removeAttributes(
    llvm::LLVMContext& C,
    const llvm::AttributeMask& AttrsToRemove)
    const

Description

Remove the specified attributes from this set. Returns a new set because attribute sets are immutable.

Declared at: llvm/include/llvm/IR/Attributes.h:344

Parameters

llvm::LLVMContext& C
const llvm::AttributeMask& AttrsToRemove

~AttributeSet()

Declared at: llvm/include/llvm/IR/Attributes.h:308