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 | 6dc3781d44e56f0addf28b06232a50f3f9e6b1af (patch) | |
tree | 21edb3db20ba66b5373175ecba30a9d36f03eafc /lib/IR | |
parent | 9f175f88190fae22df9c6e68af618d0493477ff9 (diff) | |
download | external_llvm-6dc3781d44e56f0addf28b06232a50f3f9e6b1af.zip external_llvm-6dc3781d44e56f0addf28b06232a50f3f9e6b1af.tar.gz external_llvm-6dc3781d44e56f0addf28b06232a50f3f9e6b1af.tar.bz2 |
Add a couple of accessor methods to get the kind and values of an attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173828 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Attributes.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index a3f62ae..1a97110 100644 --- a/lib/IR/Attributes.cpp +++ b/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)) |