mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 12:16:59 +00:00
Add a couple of accessor methods to get the kind and values of an attribute.
llvm-svn: 173828
This commit is contained in:
parent
06e3c96d61
commit
d6a0aeff10
@ -28,6 +28,7 @@ class AttrBuilder;
|
||||
class AttributeImpl;
|
||||
class AttributeSetImpl;
|
||||
class AttributeSetNode;
|
||||
class Constant;
|
||||
class LLVMContext;
|
||||
class Type;
|
||||
|
||||
@ -130,6 +131,12 @@ public:
|
||||
/// \brief Return true if attributes exist
|
||||
bool hasAttributes() const;
|
||||
|
||||
/// \brief Return the kind of this attribute.
|
||||
Constant *getAttributeKind() const;
|
||||
|
||||
/// \brief Return the value (if present) of the non-target-specific attribute.
|
||||
ArrayRef<Constant*> getAttributeValues() const;
|
||||
|
||||
/// \brief Returns the alignment field of an attribute as a byte alignment
|
||||
/// value.
|
||||
unsigned getAlignment() const;
|
||||
|
@ -83,6 +83,14 @@ bool Attribute::hasAttributes() const {
|
||||
return pImpl && pImpl->hasAttributes();
|
||||
}
|
||||
|
||||
Constant *Attribute::getAttributeKind() const {
|
||||
return pImpl ? pImpl->getAttributeKind() : 0;
|
||||
}
|
||||
|
||||
ArrayRef<Constant*> Attribute::getAttributeValues() const {
|
||||
return pImpl ? pImpl->getAttributeValues() : ArrayRef<Constant*>();
|
||||
}
|
||||
|
||||
/// This returns the alignment field of an attribute as a byte alignment value.
|
||||
unsigned Attribute::getAlignment() const {
|
||||
if (!hasAttribute(Attribute::Alignment))
|
||||
|
Loading…
x
Reference in New Issue
Block a user