diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-29 20:45:34 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-29 20:45:34 +0000 |
commit | 03eefb3a3887a706efeffc8752057ae1a6b76c71 (patch) | |
tree | 2450aea178916e8c6f34edd49f995ce38c9c02d0 /llvm/lib/IR | |
parent | c3c714ba7eaa9ef839680d774a90a6545d247899 (diff) | |
download | bcm5719-llvm-03eefb3a3887a706efeffc8752057ae1a6b76c71.tar.gz bcm5719-llvm-03eefb3a3887a706efeffc8752057ae1a6b76c71.zip |
Add a couple of accessor methods to get the kind and values of an attribute.
llvm-svn: 173828
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index a3f62ae0764..1a971109c22 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -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)) |