LLVM API Documentation

llvm::AttrListPtr Class Reference

#include <Attributes.h>

Collaboration diagram for llvm::AttrListPtr:
[legend]

List of all members.

Public Member Functions

 AttrListPtr ()
 AttrListPtr (const AttrListPtr &P)
const AttrListPtr & operator= (const AttrListPtr &RHS)
 ~AttrListPtr ()
AttrListPtr addAttr (unsigned Idx, Attributes Attrs) const
AttrListPtr removeAttr (unsigned Idx, Attributes Attrs) const
Attributes getParamAttributes (unsigned Idx) const
Attributes getRetAttributes () const
Attributes getFnAttributes () const
 getFnAttributes - The function attributes are returned.
bool paramHasAttr (unsigned Idx, Attributes Attr) const
unsigned getParamAlignment (unsigned Idx) const
bool hasAttrSomewhere (Attributes Attr) const
bool operator== (const AttrListPtr &RHS) const
 operator==/!= - Provide equality predicates.
bool operator!= (const AttrListPtr &RHS) const
void dump () const
void * getRawPointer () const
bool isEmpty () const
unsigned getNumSlots () const
const AttributeWithIndex & getSlot (unsigned Slot) const

Static Public Member Functions

static AttrListPtr get (const AttributeWithIndex *Attr, unsigned NumAttrs)
 get - Return a Attributes list with the specified parameter in it.
template<typename Iter>
static AttrListPtr get (const Iter &I, const Iter &E)


Detailed Description

AttrListPtr - This class manages the ref count for the opaque AttributeListImpl object and provides accessors for it.

Definition at line 138 of file Attributes.h.


Constructor & Destructor Documentation

llvm::AttrListPtr::AttrListPtr (  )  [inline]

Definition at line 143 of file Attributes.h.

Referenced by get(), and removeAttr().

AttrListPtr::AttrListPtr ( const AttrListPtr &  P  ) 

Definition at line 185 of file Attributes.cpp.

References llvm::AttributeListImpl::AddRef().

AttrListPtr::~AttrListPtr (  ) 

Definition at line 197 of file Attributes.cpp.

References llvm::AttributeListImpl::DropRef().


Member Function Documentation

const AttrListPtr & AttrListPtr::operator= ( const AttrListPtr &  RHS  ) 

AttrListPtr AttrListPtr::get ( const AttributeWithIndex *  Attr,
unsigned  NumAttrs 
) [static]

get - Return a Attributes list with the specified parameter in it.

Definition at line 141 of file Attributes.cpp.

References AttrListPtr(), ID, Index, InsertPos, llvm::Attribute::None, and llvm::AttributeListImpl::Profile().

Referenced by llvm::Module::getOrInsertFunction().

template<typename Iter>
static AttrListPtr llvm::AttrListPtr::get ( const Iter &  I,
const Iter &  E 
) [inline, static]

get - Return a Attribute list with the parameters specified by the consecutive random access iterator range.

Definition at line 158 of file Attributes.h.

References AttrListPtr(), and E.

AttrListPtr AttrListPtr::addAttr ( unsigned  Idx,
Attributes  Attrs 
) const

AttrListPtr AttrListPtr::removeAttr ( unsigned  Idx,
Attributes  Attrs 
) const

Attributes llvm::AttrListPtr::getParamAttributes ( unsigned  Idx  )  const [inline]

getParamAttributes - The attributes for the specified index are returned.

Definition at line 178 of file Attributes.h.

Referenced by llvm::CloneFunctionInto().

Attributes llvm::AttrListPtr::getRetAttributes (  )  const [inline]

getRetAttributes - The attributes for the ret value are returned.

Definition at line 185 of file Attributes.h.

Referenced by llvm::CloneFunctionInto(), and llvm::SelectionDAGLowering::LowerCallTo().

Attributes llvm::AttrListPtr::getFnAttributes (  )  const [inline]

getFnAttributes - The function attributes are returned.

Definition at line 190 of file Attributes.h.

Referenced by llvm::CloneFunctionInto().

bool llvm::AttrListPtr::paramHasAttr ( unsigned  Idx,
Attributes  Attr 
) const [inline]

paramHasAttr - Return true if the specified parameter index has the specified attribute set.

Definition at line 196 of file Attributes.h.

Referenced by llvm::Function::hasFnAttr(), llvm::InvokeInst::paramHasAttr(), llvm::CallInst::paramHasAttr(), llvm::Function::paramHasAttr(), and llvm::UpgradeIntrinsicCall().

unsigned llvm::AttrListPtr::getParamAlignment ( unsigned  Idx  )  const [inline]

getParamAlignment - Return the alignment for the specified function parameter.

Definition at line 202 of file Attributes.h.

References llvm::Attribute::getAlignmentFromAttrs().

Referenced by llvm::Function::getParamAlignment(), and llvm::InvokeInst::getParamAlignment().

bool AttrListPtr::hasAttrSomewhere ( Attributes  Attr  )  const

hasAttrSomewhere - Return true if the specified attribute is set for at least one parameter or for the return value.

hasAttrSomewhere - Return true if the specified attribute is set for at least one parameter or for the return value.

Definition at line 231 of file Attributes.cpp.

References llvm::AttributeListImpl::Attrs, and llvm::SmallVectorImpl< T >::size().

Referenced by llvm::InvokeInst::hasByValArgument().

bool llvm::AttrListPtr::operator== ( const AttrListPtr &  RHS  )  const [inline]

operator==/!= - Provide equality predicates.

Definition at line 211 of file Attributes.h.

References AttrList.

bool llvm::AttrListPtr::operator!= ( const AttrListPtr &  RHS  )  const [inline]

Definition at line 212 of file Attributes.h.

References AttrList.

void AttrListPtr::dump (  )  const

void* llvm::AttrListPtr::getRawPointer (  )  const [inline]

getRawPointer - Return a raw pointer that uniquely identifies this attribute list.

Definition at line 222 of file Attributes.h.

Referenced by llvm::ValueEnumerator::getAttributeID(), isEquivalentOperation(), llvm::Instruction::isIdenticalToWhenDefined(), and llvm::Instruction::isSameOperationAs().

bool llvm::AttrListPtr::isEmpty (  )  const [inline]

isEmpty - Return true if there are no attributes.

Definition at line 232 of file Attributes.h.

Referenced by llvm::ValueEnumerator::getAttributeID(), and VerifyAttributeCount().

unsigned AttrListPtr::getNumSlots (  )  const

getNumSlots - Return the number of slots used in this attribute list. This is the number of arguments that have an attribute set on them (including the function itself).

getNumSlots - Return the number of slots used in this attribute list. This is the number of arguments that have an attribute set on them (including the function itself).

Definition at line 204 of file Attributes.cpp.

References llvm::AttributeListImpl::Attrs.

Referenced by dump(), StripNest(), VerifyAttributeCount(), and WriteAttributeTable().

const AttributeWithIndex & AttrListPtr::getSlot ( unsigned  Slot  )  const

getSlot - Return the AttributeWithIndex at the specified slot. This holds a index number plus a set of attributes.

getSlot - Return the AttributeWithIndex at the specified slot. This holds a number plus a set of attributes.

Definition at line 210 of file Attributes.cpp.

References llvm::AttributeListImpl::Attrs.

Referenced by dump(), StripNest(), VerifyAttributeCount(), and WriteAttributeTable().


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