|
LLVM
4.0.0
|
#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 (const Attribute &A) | |
| AttrBuilder (AttributeSet AS, unsigned Idx) | |
| void | clear () |
| AttrBuilder & | addAttribute (Attribute::AttrKind Val) |
| Add an attribute to the builder. More... | |
| AttrBuilder & | addAttribute (Attribute A) |
| Add the Attribute object to the builder. More... | |
| AttrBuilder & | addAttribute (StringRef A, StringRef V=StringRef()) |
| Add the target-dependent attribute to the builder. More... | |
| AttrBuilder & | removeAttribute (Attribute::AttrKind Val) |
| Remove an attribute from the builder. More... | |
| AttrBuilder & | removeAttributes (AttributeSet A, uint64_t Index) |
| Remove the attributes from the builder. More... | |
| AttrBuilder & | removeAttribute (StringRef A) |
| Remove the target-dependent attribute to the builder. More... | |
| AttrBuilder & | merge (const AttrBuilder &B) |
| Add the attributes from the builder. More... | |
| AttrBuilder & | remove (const AttrBuilder &B) |
| Remove the attributes from the builder. More... | |
| bool | overlaps (const AttrBuilder &B) const |
| Return true if the builder has any attribute that's in the specified builder. More... | |
| bool | contains (Attribute::AttrKind A) const |
| Return true if the builder has the specified attribute. More... | |
| bool | contains (StringRef A) const |
| Return true if the builder has the specified target-dependent attribute. More... | |
| bool | hasAttributes () const |
| Return true if the builder has IR-level attributes. More... | |
| bool | hasAttributes (AttributeSet A, uint64_t Index) const |
| Return true if the builder has any attribute that's in the specified attribute. More... | |
| bool | hasAlignmentAttr () const |
| Return true if the builder has an alignment attribute. More... | |
| uint64_t | getAlignment () const |
| Retrieve the alignment attribute, if it exists. More... | |
| uint64_t | getStackAlignment () const |
| Retrieve the stack alignment attribute, if it exists. More... | |
| uint64_t | getDereferenceableBytes () const |
| Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise). More... | |
| uint64_t | getDereferenceableOrNullBytes () const |
| Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise). More... | |
| std::pair< unsigned, Optional < unsigned > > | getAllocSizeArgs () const |
| Retrieve the allocsize args, if the allocsize attribute exists. More... | |
| AttrBuilder & | addAlignmentAttr (unsigned Align) |
| This turns an int alignment (which must be a power of 2) into the form used internally in Attribute. More... | |
| AttrBuilder & | addStackAlignmentAttr (unsigned Align) |
| This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute. More... | |
| AttrBuilder & | addDereferenceableAttr (uint64_t Bytes) |
| This turns the number of dereferenceable bytes into the form used internally in Attribute. More... | |
| AttrBuilder & | addDereferenceableOrNullAttr (uint64_t Bytes) |
| This turns the number of dereferenceable_or_null bytes into the form used internally in Attribute. More... | |
| AttrBuilder & | addAllocSizeAttr (unsigned ElemSizeArg, const Optional< unsigned > &NumElemsArg) |
| This turns one (or two) ints into the form used internally in Attribute. More... | |
| AttrBuilder & | addAllocSizeAttrFromRawRepr (uint64_t RawAllocSizeRepr) |
| Add an allocsize attribute, using the representation returned by Attribute.getIntValue(). More... | |
| bool | empty () const |
| Return true if the builder contains no target-independent attributes. More... | |
| 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) |
Definition at line 445 of file Attributes.h.
| typedef std::map<std::string, std::string>::const_iterator llvm::AttrBuilder::td_const_iterator |
Definition at line 564 of file Attributes.h.
Definition at line 566 of file Attributes.h.
| typedef std::map<std::string, std::string>::iterator llvm::AttrBuilder::td_iterator |
Definition at line 563 of file Attributes.h.
Definition at line 565 of file Attributes.h.
| typedef std::pair<std::string, std::string> llvm::AttrBuilder::td_type |
Definition at line 562 of file Attributes.h.
|
inline |
Definition at line 455 of file Attributes.h.
Definition at line 458 of file Attributes.h.
References addAttribute().
| AttrBuilder::AttrBuilder | ( | AttributeSet | AS, |
| unsigned | Idx | ||
| ) |
Definition at line 1138 of file Attributes.cpp.
References addAttribute(), llvm::AttributeSetImpl::begin(), E, llvm::AttributeSetImpl::end(), llvm::AttributeSetImpl::getNumSlots(), 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 1250 of file Attributes.cpp.
References assert(), and llvm::isPowerOf2_32().
Referenced by addRawAttributeValue(), decodeLLVMAttributesForBitcode(), getParameterABIAttributes(), and LLVMSetInstrParamAlignment().
| AttrBuilder & AttrBuilder::addAllocSizeAttr | ( | unsigned | ElemSizeArg, |
| const Optional< unsigned > & | NumElemsArg | ||
| ) |
This turns one (or two) ints into the form used internally in Attribute.
Definition at line 1290 of file Attributes.cpp.
References addAllocSizeAttrFromRawRepr(), and packAllocSizeArgs().
Referenced by llvm::AttributeSet::addAllocSizeAttr().
| AttrBuilder & AttrBuilder::addAllocSizeAttrFromRawRepr | ( | uint64_t | RawAllocSizeRepr | ) |
Add an allocsize attribute, using the representation returned by Attribute.getIntValue().
Definition at line 1295 of file Attributes.cpp.
References assert().
Referenced by addAllocSizeAttr().
| AttrBuilder & AttrBuilder::addAttribute | ( | Attribute::AttrKind | Val | ) |
Add an attribute to the builder.
Definition at line 1162 of file Attributes.cpp.
References assert(), and llvm::Attribute::EndAttrKinds.
Referenced by addArgumentAttrs(), addArgumentReturnedAttrs(), llvm::AttributeSet::addAttribute(), addAttribute(), llvm::AttributeSet::addAttributes(), addRawAttributeValue(), addReadAttrs(), adjustCallerSSPLevel(), AttrBuilder(), getParameterABIAttributes(), LLVMAddTargetDependentFunctionAttr(), RemoveNonValidAttrAtIndex(), and llvm::AttributeFuncs::typeIncompatible().
| AttrBuilder & AttrBuilder::addAttribute | ( | Attribute | A | ) |
Add the Attribute object to the builder.
Definition at line 1171 of file Attributes.cpp.
References addAttribute(), llvm::Attribute::getAlignment(), llvm::Attribute::getDereferenceableBytes(), llvm::Attribute::getDereferenceableOrNullBytes(), llvm::Attribute::getKindAsEnum(), llvm::Attribute::getKindAsString(), llvm::Attribute::getStackAlignment(), llvm::Attribute::getValueAsInt(), llvm::Attribute::getValueAsString(), llvm::Attribute::isStringAttribute(), and Kind.
| AttrBuilder & AttrBuilder::addAttribute | ( | StringRef | A, |
| StringRef | V = StringRef() |
||
| ) |
Add the target-dependent attribute to the builder.
Definition at line 1193 of file Attributes.cpp.
References A.
| AttrBuilder & AttrBuilder::addDereferenceableAttr | ( | uint64_t | Bytes | ) |
This turns the number of dereferenceable bytes into the form used internally in Attribute.
Definition at line 1273 of file Attributes.cpp.
Referenced by llvm::AttributeSet::addDereferenceableAttr(), and llvm::AttributeFuncs::typeIncompatible().
| AttrBuilder & AttrBuilder::addDereferenceableOrNullAttr | ( | uint64_t | Bytes | ) |
This turns the number of dereferenceable_or_null bytes into the form used internally in Attribute.
Definition at line 1281 of file Attributes.cpp.
Referenced by llvm::AttributeSet::addDereferenceableOrNullAttr(), and llvm::AttributeFuncs::typeIncompatible().
| AttrBuilder & AttrBuilder::addStackAlignmentAttr | ( | unsigned | Align | ) |
This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute.
Definition at line 1261 of file Attributes.cpp.
References assert(), and llvm::isPowerOf2_32().
Referenced by addRawAttributeValue().
| void AttrBuilder::clear | ( | ) |
Definition at line 1155 of file Attributes.cpp.
|
inline |
Return true if the builder has the specified attribute.
Definition at line 496 of file Attributes.h.
References A, assert(), and llvm::Attribute::EndAttrKinds.
Referenced by llvm::AttributeSet::get(), and overlaps().
Return true if the builder has the specified target-dependent attribute.
Definition at line 1369 of file Attributes.cpp.
|
inline |
Return true if the builder contains no target-independent attributes.
Definition at line 559 of file Attributes.h.
Referenced by RemoveNonValidAttrAtIndex().
|
inline |
Retrieve the alignment attribute, if it exists.
Definition at line 516 of file Attributes.h.
Referenced by llvm::AttributeSet::get().
Retrieve the allocsize args, if the allocsize attribute exists.
If it doesn't exist, pair(0, 0) is returned.
Definition at line 1246 of file Attributes.cpp.
References unpackAllocSizeArgs().
Referenced by llvm::AttributeSet::get().
|
inline |
Retrieve the number of dereferenceable bytes, if the dereferenceable attribute exists (zero is returned otherwise).
Definition at line 523 of file Attributes.h.
Referenced by llvm::AttributeSet::get().
|
inline |
Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise).
Definition at line 527 of file Attributes.h.
Referenced by llvm::AttributeSet::get().
|
inline |
Retrieve the stack alignment attribute, if it exists.
Definition at line 519 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 1401 of file Attributes.cpp.
Referenced by llvm::AttributeSet::removeAttributes().
| bool AttrBuilder::hasAttributes | ( | ) | const |
Return true if the builder has IR-level attributes.
Definition at line 1373 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 1377 of file Attributes.cpp.
References assert(), llvm::AttributeSet::begin(), E, 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 | ) |
Add the attributes from the builder.
Definition at line 1306 of file Attributes.cpp.
References I, and td_attrs().
|
inline |
Definition at line 582 of file Attributes.h.
References B.
| bool AttrBuilder::operator== | ( | const AttrBuilder & | B | ) |
Definition at line 1405 of file Attributes.cpp.
| bool AttrBuilder::overlaps | ( | const AttrBuilder & | B | ) | const |
Return true if the builder has any attribute that's in the specified builder.
Definition at line 1356 of file Attributes.cpp.
References contains(), I, and td_attrs().
| AttrBuilder & AttrBuilder::remove | ( | const AttrBuilder & | B | ) |
Remove the attributes from the builder.
Definition at line 1331 of file Attributes.cpp.
References I, and td_attrs().
Referenced by llvm::AttributeSet::removeAttributes().
| AttrBuilder & AttrBuilder::removeAttribute | ( | Attribute::AttrKind | Val | ) |
Remove an attribute from the builder.
Definition at line 1198 of file Attributes.cpp.
References assert(), and llvm::Attribute::EndAttrKinds.
Referenced by removeAttributes().
| AttrBuilder & AttrBuilder::removeAttribute | ( | StringRef | A | ) |
Remove the target-dependent attribute to the builder.
Definition at line 1239 of file Attributes.cpp.
References I.
| AttrBuilder & AttrBuilder::removeAttributes | ( | AttributeSet | A, |
| uint64_t | Index | ||
| ) |
Remove the attributes from the builder.
Definition at line 1216 of file Attributes.cpp.
References assert(), llvm::AttributeSet::begin(), E, llvm::AttributeSet::end(), llvm::Attribute::getKindAsEnum(), llvm::Attribute::getKindAsString(), llvm::AttributeSet::getNumSlots(), llvm::AttributeSet::getSlotIndex(), I, llvm::Attribute::isEnumAttribute(), llvm::Attribute::isIntAttribute(), llvm::Attribute::isStringAttribute(), and removeAttribute().
Referenced by llvm::AttributeSet::removeAttributes().
|
inline |
Definition at line 574 of file Attributes.h.
References td_begin(), and td_end().
Referenced by llvm::AttributeSet::get(), merge(), overlaps(), and remove().
|
inline |
Definition at line 575 of file Attributes.h.
References td_begin(), and td_end().
|
inline |
Definition at line 568 of file Attributes.h.
Referenced by td_attrs().
|
inline |
Definition at line 571 of file Attributes.h.
|
inline |
Definition at line 579 of file Attributes.h.
|
inline |
Definition at line 569 of file Attributes.h.
Referenced by td_attrs().
|
inline |
Definition at line 572 of file Attributes.h.
1.8.6