LLVM  mainline
Public Types | Public Member Functions
llvm::AttrBuilder Class Reference

#include <Attributes.h>

List of all members.

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 ()
AttrBuilderaddAttribute (Attribute::AttrKind Val)
 Add an attribute to the builder.
AttrBuilderaddAttribute (Attribute A)
 Add the Attribute object to the builder.
AttrBuilderaddAttribute (StringRef A, StringRef V=StringRef())
 Add the target-dependent attribute to the builder.
AttrBuilderremoveAttribute (Attribute::AttrKind Val)
 Remove an attribute from the builder.
AttrBuilderremoveAttributes (AttributeSet A, uint64_t Index)
 Remove the attributes from the builder.
AttrBuilderremoveAttribute (StringRef A)
 Remove the target-dependent attribute to the builder.
AttrBuildermerge (const AttrBuilder &B)
 Add the attributes from the builder.
AttrBuilderremove (const AttrBuilder &B)
 Remove the attributes from the builder.
bool overlaps (const AttrBuilder &B) const
 Return true if the builder has any attribute that's in the specified 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).
uint64_t getDereferenceableOrNullBytes () const
 Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise).
AttrBuilderaddAlignmentAttr (unsigned Align)
 This turns an int alignment (which must be a power of 2) into the form used internally in Attribute.
AttrBuilderaddStackAlignmentAttr (unsigned Align)
 This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute.
AttrBuilderaddDereferenceableAttr (uint64_t Bytes)
 This turns the number of dereferenceable bytes into the form used internally in Attribute.
AttrBuilderaddDereferenceableOrNullAttr (uint64_t Bytes)
 This turns the number of dereferenceable_or_null 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)
AttrBuilderaddRawValue (uint64_t Val)
 Add the raw value to the internal representation.

Detailed Description

Definition at line 432 of file Attributes.h.


Member Typedef Documentation

typedef std::map<std::string, std::string>::const_iterator llvm::AttrBuilder::td_const_iterator

Definition at line 542 of file Attributes.h.

Definition at line 544 of file Attributes.h.

typedef std::map<std::string, std::string>::iterator llvm::AttrBuilder::td_iterator

Definition at line 541 of file Attributes.h.

Definition at line 543 of file Attributes.h.

typedef std::pair<std::string, std::string> llvm::AttrBuilder::td_type

Definition at line 540 of file Attributes.h.


Constructor & Destructor Documentation

Definition at line 440 of file Attributes.h.

llvm::AttrBuilder::AttrBuilder ( uint64_t  Val) [inline, explicit]

Definition at line 443 of file Attributes.h.

References addRawValue().

Definition at line 448 of file Attributes.h.

References addAttribute().


Member Function Documentation

This turns an int alignment (which must be a power of 2) into the form used internally in Attribute.

Definition at line 1202 of file Attributes.cpp.

References Align(), llvm::Attribute::Alignment, and llvm::isPowerOf2_32().

Referenced by decodeLLVMAttributesForBitcode(), getParameterABIAttributes(), LLVMSetInstrParamAlignment(), and LLVMSetParamAlignment().

Add the target-dependent attribute to the builder.

Definition at line 1138 of file Attributes.cpp.

References llvm::ARM_PROC::A.

This turns the number of dereferenceable bytes into the form used internally in Attribute.

Definition at line 1225 of file Attributes.cpp.

References llvm::Attribute::Dereferenceable.

Referenced by llvm::AttributeSet::addDereferenceableAttr(), and llvm::AttributeFuncs::typeIncompatible().

This turns the number of dereferenceable_or_null bytes into the form used internally in Attribute.

Definition at line 1233 of file Attributes.cpp.

References llvm::Attribute::DereferenceableOrNull.

Referenced by llvm::AttributeSet::addDereferenceableOrNullAttr(), and llvm::AttributeFuncs::typeIncompatible().

This turns an int stack alignment (which must be a power of 2) into the form used internally in Attribute.

Definition at line 1213 of file Attributes.cpp.

References Align(), llvm::isPowerOf2_32(), and llvm::Attribute::StackAlignment.

Definition at line 1104 of file Attributes.cpp.

Return true if the builder has the specified attribute.

Definition at line 486 of file Attributes.h.

References llvm::ARM_PROC::A, 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 1299 of file Attributes.cpp.

bool llvm::AttrBuilder::empty ( ) const [inline]

Return true if the builder contains no target-independent attributes.

Definition at line 537 of file Attributes.h.

uint64_t llvm::AttrBuilder::getAlignment ( ) const [inline]

Retrieve the alignment attribute, if it exists.

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

Referenced by llvm::AttributeSet::get().

Retrieve the number of dereferenceable_or_null bytes, if the dereferenceable_or_null attribute exists (zero is returned otherwise).

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

Referenced by llvm::AttributeSet::get().

Return true if the builder has an alignment attribute.

Definition at line 1332 of file Attributes.cpp.

Referenced by llvm::AttributeSet::removeAttributes().

Return true if the builder has IR-level attributes.

Definition at line 1303 of file Attributes.cpp.

Referenced by llvm::AttributeSet::get().

bool AttrBuilder::hasAttributes ( AttributeSet  A,
uint64_t  Index 
) const

Add the attributes from the builder.

Definition at line 1242 of file Attributes.cpp.

References I, and td_attrs().

bool llvm::AttrBuilder::operator!= ( const AttrBuilder B) [inline]

Definition at line 560 of file Attributes.h.

bool AttrBuilder::operator== ( const AttrBuilder B)

Definition at line 1336 of file Attributes.cpp.

References I.

Return true if the builder has any attribute that's in the specified builder.

Definition at line 1286 of file Attributes.cpp.

References contains(), I, and td_attrs().

Remove the attributes from the builder.

Definition at line 1264 of file Attributes.cpp.

References I, and td_attrs().

Referenced by llvm::AttributeSet::removeAttributes().

Remove the target-dependent attribute to the builder.

Definition at line 1195 of file Attributes.cpp.

References I.

Definition at line 552 of file Attributes.h.

References td_begin(), and td_end().

Referenced by llvm::AttributeSet::get(), merge(), overlaps(), and remove().

Definition at line 553 of file Attributes.h.

References td_begin(), and td_end().

Definition at line 546 of file Attributes.h.

Referenced by td_attrs().

Definition at line 549 of file Attributes.h.

bool llvm::AttrBuilder::td_empty ( ) const [inline]

Definition at line 557 of file Attributes.h.

Definition at line 547 of file Attributes.h.

Referenced by td_attrs().

Definition at line 550 of file Attributes.h.


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