LLVM API Documentation
#include <Attributes.h>
Public Types | |
typedef std::pair< std::string, std::string > | td_type |
typedef std::map< std::string, std::string >::iterator | td_iterator |
typedef std::map< std::string, std::string >::const_iterator | td_const_iterator |
typedef llvm::iterator_range < td_iterator > | td_range |
typedef llvm::iterator_range < td_const_iterator > | td_const_range |
Public Member Functions | |
AttrBuilder () | |
AttrBuilder (uint64_t Val) | |
AttrBuilder (const Attribute &A) | |
AttrBuilder (AttributeSet AS, unsigned Idx) | |
void | clear () |
AttrBuilder & | addAttribute (Attribute::AttrKind Val) |
Add an attribute to the builder. | |
AttrBuilder & | addAttribute (Attribute A) |
Add the Attribute object to the builder. | |
AttrBuilder & | addAttribute (StringRef A, StringRef V=StringRef()) |
Add the target-dependent attribute to the builder. | |
AttrBuilder & | removeAttribute (Attribute::AttrKind Val) |
Remove an attribute from the builder. | |
AttrBuilder & | removeAttributes (AttributeSet A, uint64_t Index) |
Remove the attributes from the builder. | |
AttrBuilder & | removeAttribute (StringRef A) |
Remove the target-dependent attribute to the builder. | |
AttrBuilder & | merge (const AttrBuilder &B) |
Add the attributes from the builder. | |
bool | contains (Attribute::AttrKind A) const |
Return true if the builder has the specified attribute. | |
bool | contains (StringRef A) const |
Return true if the builder has the specified target-dependent attribute. | |
bool | hasAttributes () const |
Return true if the builder has IR-level attributes. | |
bool | hasAttributes (AttributeSet A, uint64_t Index) const |
Return true if the builder has any attribute that's in the specified attribute. | |
bool | hasAlignmentAttr () const |
Return true if the builder has an alignment attribute. | |
uint64_t | getAlignment () const |
Retrieve the alignment attribute, if it exists. | |
uint64_t | getStackAlignment () const |
Retrieve the stack alignment attribute, if it exists. | |
uint64_t | getDereferenceableBytes () const |
Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise). | |
AttrBuilder & | addAlignmentAttr (unsigned Align) |
This turns an int alignment (which must be a power of 2) into the form used internally in Attribute. | |
AttrBuilder & | addStackAlignmentAttr (unsigned Align) |
This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute. | |
AttrBuilder & | addDereferenceableAttr (uint64_t Bytes) |
This turns the number of dereferenceable bytes into the form used internally in Attribute. | |
bool | empty () const |
Return true if the builder contains no target-independent attributes. | |
td_iterator | td_begin () |
td_iterator | td_end () |
td_const_iterator | td_begin () const |
td_const_iterator | td_end () const |
td_range | td_attrs () |
td_const_range | td_attrs () const |
bool | td_empty () const |
bool | operator== (const AttrBuilder &B) |
bool | operator!= (const AttrBuilder &B) |
AttrBuilder & | addRawValue (uint64_t Val) |
Add the raw value to the internal representation. |
Definition at line 403 of file Attributes.h.
typedef std::map<std::string, std::string>::const_iterator llvm::AttrBuilder::td_const_iterator |
Definition at line 493 of file Attributes.h.
Definition at line 495 of file Attributes.h.
typedef std::map<std::string, std::string>::iterator llvm::AttrBuilder::td_iterator |
Definition at line 492 of file Attributes.h.
Definition at line 494 of file Attributes.h.
typedef std::pair<std::string, std::string> llvm::AttrBuilder::td_type |
Definition at line 491 of file Attributes.h.
llvm::AttrBuilder::AttrBuilder | ( | ) | [inline] |
Definition at line 410 of file Attributes.h.
llvm::AttrBuilder::AttrBuilder | ( | uint64_t | Val | ) | [inline, explicit] |
Definition at line 411 of file Attributes.h.
References addRawValue().
llvm::AttrBuilder::AttrBuilder | ( | const Attribute & | A | ) | [inline] |
Definition at line 415 of file Attributes.h.
References addAttribute().
AttrBuilder::AttrBuilder | ( | AttributeSet | AS, |
unsigned | Idx | ||
) |
Definition at line 1006 of file Attributes.cpp.
References addAttribute(), llvm::AttributeSetImpl::begin(), llvm::AttributeSetImpl::end(), llvm::AttributeSetImpl::getNumAttributes(), llvm::AttributeSetImpl::getSlotIndex(), I, and llvm::ARM_PROC::IE.
AttrBuilder & AttrBuilder::addAlignmentAttr | ( | unsigned | Align | ) |
This turns an int alignment (which must be a power of 2) into the form used internally in Attribute.
Definition at line 1114 of file Attributes.cpp.
References Align(), llvm::Attribute::Alignment, and llvm::isPowerOf2_32().
Referenced by decodeLLVMAttributesForBitcode(), getParameterABIAttributes(), LLVMSetInstrParamAlignment(), and LLVMSetParamAlignment().
Add an attribute to the builder.
Definition at line 1027 of file Attributes.cpp.
References llvm::Attribute::Alignment, llvm::Attribute::Dereferenceable, llvm::Attribute::EndAttrKinds, and llvm::Attribute::StackAlignment.
Referenced by llvm::AttributeSet::addAttribute(), addAttribute(), llvm::AttributeSet::addAttributes(), AdjustCallerSSPLevel(), AttrBuilder(), getParameterABIAttributes(), LLVMAddTargetDependentFunctionAttr(), and llvm::AttributeFuncs::typeIncompatible().
Add the Attribute object to the builder.
Definition at line 1036 of file Attributes.cpp.
References addAttribute(), llvm::Attribute::Alignment, llvm::Attribute::Dereferenceable, llvm::Attribute::getAlignment(), llvm::Attribute::getDereferenceableBytes(), llvm::Attribute::getKindAsEnum(), llvm::Attribute::getKindAsString(), llvm::Attribute::getStackAlignment(), llvm::Attribute::getValueAsString(), llvm::Attribute::isStringAttribute(), and llvm::Attribute::StackAlignment.
AttrBuilder & AttrBuilder::addAttribute | ( | StringRef | A, |
StringRef | V = StringRef() |
||
) |
Add the target-dependent attribute to the builder.
Definition at line 1054 of file Attributes.cpp.
References llvm::ARM_PROC::A.
AttrBuilder & AttrBuilder::addDereferenceableAttr | ( | uint64_t | Bytes | ) |
This turns the number of dereferenceable bytes into the form used internally in Attribute.
Definition at line 1137 of file Attributes.cpp.
References llvm::Attribute::Dereferenceable.
Referenced by llvm::AttributeFuncs::typeIncompatible().
AttrBuilder & AttrBuilder::addRawValue | ( | uint64_t | Val | ) |
Add the raw value to the internal representation.
Definition at line 1215 of file Attributes.cpp.
References llvm::ARM_PROC::A, llvm::Attribute::Alignment, llvm::Attribute::Dereferenceable, llvm::Attribute::EndAttrKinds, llvm::AttributeImpl::getAttrMask(), I, llvm::Attribute::None, and llvm::Attribute::StackAlignment.
Referenced by AttrBuilder(), and decodeLLVMAttributesForBitcode().
This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute.
Definition at line 1125 of file Attributes.cpp.
References Align(), llvm::isPowerOf2_32(), and llvm::Attribute::StackAlignment.
void AttrBuilder::clear | ( | ) |
Definition at line 1022 of file Attributes.cpp.
bool llvm::AttrBuilder::contains | ( | Attribute::AttrKind | A | ) | const [inline] |
Return true if the builder has the specified attribute.
Definition at line 445 of file Attributes.h.
References llvm::ARM_PROC::A, and llvm::Attribute::EndAttrKinds.
Referenced by llvm::AttributeSet::get().
bool AttrBuilder::contains | ( | StringRef | A | ) | const |
Return true if the builder has the specified target-dependent attribute.
Definition at line 1165 of file Attributes.cpp.
bool llvm::AttrBuilder::empty | ( | ) | const [inline] |
Return true if the builder contains no target-independent attributes.
Definition at line 488 of file Attributes.h.
uint64_t llvm::AttrBuilder::getAlignment | ( | ) | const [inline] |
Retrieve the alignment attribute, if it exists.
Definition at line 465 of file Attributes.h.
Referenced by llvm::AttributeSet::get().
uint64_t llvm::AttrBuilder::getDereferenceableBytes | ( | ) | const [inline] |
Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise).
Definition at line 472 of file Attributes.h.
Referenced by llvm::AttributeSet::get().
uint64_t llvm::AttrBuilder::getStackAlignment | ( | ) | const [inline] |
Retrieve the stack alignment attribute, if it exists.
Definition at line 468 of file Attributes.h.
Referenced by llvm::AttributeSet::get().
bool AttrBuilder::hasAlignmentAttr | ( | ) | const |
Return true if the builder has an alignment attribute.
Definition at line 1198 of file Attributes.cpp.
bool AttrBuilder::hasAttributes | ( | ) | const |
Return true if the builder has IR-level attributes.
Definition at line 1169 of file Attributes.cpp.
Referenced by llvm::AttributeSet::get().
bool AttrBuilder::hasAttributes | ( | AttributeSet | A, |
uint64_t | Index | ||
) | const |
Return true if the builder has any attribute that's in the specified attribute.
Definition at line 1173 of file Attributes.cpp.
References llvm::AttributeSet::begin(), llvm::AttributeSet::end(), llvm::Attribute::getKindAsString(), llvm::AttributeSet::getNumSlots(), llvm::AttributeSet::getSlotIndex(), I, llvm::Attribute::isEnumAttribute(), llvm::Attribute::isIntAttribute(), and llvm::Attribute::isStringAttribute().
AttrBuilder & AttrBuilder::merge | ( | const AttrBuilder & | B | ) |
bool llvm::AttrBuilder::operator!= | ( | const AttrBuilder & | B | ) | [inline] |
Definition at line 511 of file Attributes.h.
bool AttrBuilder::operator== | ( | const AttrBuilder & | B | ) |
Definition at line 1202 of file Attributes.cpp.
References I.
Remove an attribute from the builder.
Definition at line 1059 of file Attributes.cpp.
References llvm::Attribute::Alignment, llvm::Attribute::Dereferenceable, llvm::Attribute::EndAttrKinds, and llvm::Attribute::StackAlignment.
Remove the target-dependent attribute to the builder.
Definition at line 1107 of file Attributes.cpp.
References I.
AttrBuilder & AttrBuilder::removeAttributes | ( | AttributeSet | A, |
uint64_t | Index | ||
) |
Remove the attributes from the builder.
Definition at line 1073 of file Attributes.cpp.
References llvm::Attribute::Alignment, llvm::AttributeSet::begin(), llvm::Attribute::Dereferenceable, llvm::AttributeSet::end(), llvm::Attribute::getKindAsString(), llvm::AttributeSet::getNumSlots(), llvm::AttributeSet::getSlotIndex(), I, llvm::Attribute::isEnumAttribute(), llvm::Attribute::isIntAttribute(), llvm::Attribute::isStringAttribute(), and llvm::Attribute::StackAlignment.
Referenced by llvm::AttributeSet::removeAttributes().
td_range llvm::AttrBuilder::td_attrs | ( | ) | [inline] |
Definition at line 503 of file Attributes.h.
References td_begin(), and td_end().
Referenced by llvm::AttributeSet::get().
td_const_range llvm::AttrBuilder::td_attrs | ( | ) | const [inline] |
Definition at line 504 of file Attributes.h.
References td_begin(), and td_end().
td_iterator llvm::AttrBuilder::td_begin | ( | ) | [inline] |
Definition at line 497 of file Attributes.h.
Referenced by td_attrs().
td_const_iterator llvm::AttrBuilder::td_begin | ( | ) | const [inline] |
Definition at line 500 of file Attributes.h.
bool llvm::AttrBuilder::td_empty | ( | ) | const [inline] |
Definition at line 508 of file Attributes.h.
td_iterator llvm::AttrBuilder::td_end | ( | ) | [inline] |
Definition at line 498 of file Attributes.h.
Referenced by td_attrs().
td_const_iterator llvm::AttrBuilder::td_end | ( | ) | const [inline] |
Definition at line 501 of file Attributes.h.