LLVM API Documentation
#include <Attributes.h>
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) |
Definition at line 138 of file Attributes.h.
| llvm::AttrListPtr::AttrListPtr | ( | ) | [inline] |
| AttrListPtr::AttrListPtr | ( | const AttrListPtr & | P | ) |
| AttrListPtr::~AttrListPtr | ( | ) |
| const AttrListPtr & AttrListPtr::operator= | ( | const AttrListPtr & | RHS | ) |
Definition at line 189 of file Attributes.cpp.
References llvm::AttributeListImpl::AddRef(), AttrList, and llvm::AttributeListImpl::DropRef().
| 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().
| 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 |
addAttr - Add the specified attribute at the specified index to this attribute list. Since attribute lists are immutable, this returns the new list.
Definition at line 242 of file Attributes.cpp.
References llvm::Attribute::Alignment, llvm::AttributeListImpl::Attrs, llvm::SmallVectorImpl< T >::begin(), llvm::SmallVectorImpl< T >::data(), llvm::SmallVectorImpl< T >::end(), llvm::AttributeWithIndex::get(), Index, llvm::SmallVectorImpl< T >::insert(), llvm::SmallVectorImpl< T >::push_back(), and llvm::SmallVectorImpl< T >::size().
Referenced by llvm::Function::addAttribute(), llvm::InvokeInst::addAttribute(), llvm::CallInst::addAttribute(), llvm::CloneFunctionInto(), LLVMAddFunctionAttr(), LLVMAddInstrAttribute(), and LLVMSetInstrParamAlignment().
| AttrListPtr AttrListPtr::removeAttr | ( | unsigned | Idx, | |
| Attributes | Attrs | |||
| ) | const |
removeAttr - Remove the specified attribute at the specified index from this attribute list. Since attribute lists are immutable, this returns the new list.
Definition at line 283 of file Attributes.cpp.
References llvm::Attribute::Alignment, AttrListPtr(), llvm::AttributeListImpl::Attrs, llvm::SmallVectorImpl< T >::begin(), llvm::SmallVectorImpl< T >::data(), llvm::SmallVectorImpl< T >::end(), llvm::AttributeWithIndex::get(), Index, llvm::SmallVectorImpl< T >::insert(), llvm::SmallVectorImpl< T >::push_back(), and llvm::SmallVectorImpl< T >::size().
Referenced by LLVMRemoveFunctionAttr(), LLVMRemoveInstrAttribute(), llvm::CallInst::removeAttribute(), llvm::InvokeInst::removeAttribute(), llvm::Function::removeAttribute(), and StripNest().
| 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().
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] |
| void AttrListPtr::dump | ( | ) | const |
Definition at line 318 of file Attributes.cpp.
References llvm::AttributeWithIndex::Attrs, llvm::cerr(), getNumSlots(), getSlot(), and llvm::AttributeWithIndex::Index.
| 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().