LLVM API Documentation

llvm::AttrListPtr Class Reference

#include <Attributes.h>

Collaboration diagram for llvm::AttrListPtr:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AttrListPtr ()
 AttrListPtr (const AttrListPtr &P)
const AttrListPtroperator= (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 AttributeWithIndexgetSlot (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 132 of file Attributes.h.


Constructor & Destructor Documentation

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

Definition at line 137 of file Attributes.h.

Referenced by get(), and removeAttr().

AttrListPtr::AttrListPtr ( const AttrListPtr P  ) 

Definition at line 169 of file Attributes.cpp.

References llvm::AttributeListImpl::AddRef().

AttrListPtr::~AttrListPtr (  ) 

Definition at line 181 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 128 of file Attributes.cpp.

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

Referenced by llvm::Intrinsic::getAttributes(), and 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 152 of file Attributes.h.

References AttrListPtr(), E, and I.

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 172 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 179 of file Attributes.h.

Referenced by llvm::CloneFunctionInto().

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

getFnAttributes - The function attributes are returned.

Definition at line 184 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 190 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 196 of file Attributes.h.

References llvm::Attribute::getAlignmentFromAttrs().

Referenced by llvm::InvokeInst::getParamAlignment(), and llvm::Function::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 215 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 205 of file Attributes.h.

References AttrList.

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

Definition at line 206 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 216 of file Attributes.h.

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

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

isEmpty - Return true if there are no attributes.

Definition at line 226 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 188 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 194 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:



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.