class AttrBuilder

Declaration

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

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

Method Overview

Methods

AttrBuilder(const llvm::Attribute& A)

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

Parameters

const llvm::Attribute& A

AttrBuilder(llvm::AttributeList AS,
            unsigned int Idx)

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

Parameters

llvm::AttributeList AS
unsigned int Idx

AttrBuilder(llvm::AttributeSet AS)

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

Parameters

llvm::AttributeSet AS

AttrBuilder()

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

llvm::AttrBuilder& addAlignmentAttr(
    llvm::MaybeAlign Align)

Description

This turns an alignment into the form used internally in Attribute. This call has no effect if Align is not set.

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

Parameters

llvm::MaybeAlign Align

inline llvm::AttrBuilder& addAlignmentAttr(
    unsigned int Align)

Description

This turns an int alignment (which must be a power of 2) into the form used internally in Attribute. This call has no effect if Align is 0. Deprecated, use the version using a MaybeAlign.

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

Parameters

unsigned int Align

llvm::AttrBuilder& addAllocSizeAttr(
    unsigned int ElemSizeArg,
    const Optional<unsigned int>& NumElemsArg)

Description

This turns one (or two) ints into the form used internally in Attribute.

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

Parameters

unsigned int ElemSizeArg
const Optional<unsigned int>& NumElemsArg

llvm::AttrBuilder& addAllocSizeAttrFromRawRepr(
    uint64_t RawAllocSizeRepr)

Description

Add an allocsize attribute, using the representation returned by Attribute.getIntValue().

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

Parameters

uint64_t RawAllocSizeRepr

llvm::AttrBuilder& addAttribute(
    Attribute::AttrKind Val)

Description

Add an attribute to the builder.

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

Parameters

Attribute::AttrKind Val

llvm::AttrBuilder& addAttribute(llvm::Attribute A)

Description

Add the Attribute object to the builder.

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

Parameters

llvm::Attribute A

llvm::AttrBuilder& addAttribute(
    llvm::StringRef A,
    llvm::StringRef V = llvm::StringRef())

Description

Add the target-dependent attribute to the builder.

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

Parameters

llvm::StringRef A
llvm::StringRef V = llvm::StringRef()

llvm::AttrBuilder& addByValAttr(llvm::Type* Ty)

Description

This turns a byval type into the form used internally in Attribute.

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

Parameters

llvm::Type* Ty

llvm::AttrBuilder& addDereferenceableAttr(
    uint64_t Bytes)

Description

This turns the number of dereferenceable bytes into the form used internally in Attribute.

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

Parameters

uint64_t Bytes

llvm::AttrBuilder& addDereferenceableOrNullAttr(
    uint64_t Bytes)

Description

This turns the number of dereferenceable_or_null bytes into the form used internally in Attribute.

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

Parameters

uint64_t Bytes

inline llvm::AttrBuilder& addStackAlignmentAttr(
    unsigned int Align)

Description

This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute. This call has no effect if Align is 0. Deprecated, use the version using a MaybeAlign.

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

Parameters

unsigned int Align

llvm::AttrBuilder& addStackAlignmentAttr(
    llvm::MaybeAlign Align)

Description

This turns a stack alignment into the form used internally in Attribute. This call has no effect if Align is not set.

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

Parameters

llvm::MaybeAlign Align

void clear()

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

bool contains(Attribute::AttrKind A) const

Description

Return true if the builder has the specified attribute.

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

Parameters

Attribute::AttrKind A

bool contains(llvm::StringRef A) const

Description

Return true if the builder has the specified target-dependent attribute.

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

Parameters

llvm::StringRef A

bool empty() const

Description

Return true if the builder contains no target-independent attributes.

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

llvm::MaybeAlign getAlignment() const

Description

Retrieve the alignment attribute, if it exists.

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

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

Description

Retrieve the allocsize args, if the allocsize attribute exists. If it doesn't exist, pair(0, 0) is returned.

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

llvm::Type* getByValType() const

Description

Retrieve the byval type.

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

uint64_t getDereferenceableBytes() const

Description

Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise).

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

uint64_t getDereferenceableOrNullBytes() const

Description

Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise).

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

llvm::MaybeAlign getStackAlignment() const

Description

Retrieve the stack alignment attribute, if it exists.

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

bool hasAlignmentAttr() const

Description

Return true if the builder has an alignment attribute.

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

bool hasAttributes(llvm::AttributeList A,
                   uint64_t Index) const

Description

Return true if the builder has any attribute that's in the specified attribute.

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

Parameters

llvm::AttributeList A
uint64_t Index

bool hasAttributes() const

Description

Return true if the builder has IR-level attributes.

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

llvm::AttrBuilder& merge(
    const llvm::AttrBuilder& B)

Description

Add the attributes from the builder.

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

Parameters

const llvm::AttrBuilder& B

bool overlaps(const llvm::AttrBuilder& B) const

Description

Return true if the builder has any attribute that's in the specified builder.

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

Parameters

const llvm::AttrBuilder& B

llvm::AttrBuilder& remove(
    const llvm::AttrBuilder& B)

Description

Remove the attributes from the builder.

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

Parameters

const llvm::AttrBuilder& B

llvm::AttrBuilder& removeAttribute(
    llvm::StringRef A)

Description

Remove the target-dependent attribute to the builder.

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

Parameters

llvm::StringRef A

llvm::AttrBuilder& removeAttribute(
    Attribute::AttrKind Val)

Description

Remove an attribute from the builder.

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

Parameters

Attribute::AttrKind Val

llvm::AttrBuilder& removeAttributes(
    llvm::AttributeList A,
    uint64_t WithoutIndex)

Description

Remove the attributes from the builder.

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

Parameters

llvm::AttributeList A
uint64_t WithoutIndex

int td_attrs()

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

int td_attrs() const

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

int td_begin()

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

int td_begin() const

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

bool td_empty() const

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

int td_end()

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

int td_end() const

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