summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-29 20:45:34 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-29 20:45:34 +0000
commit03eefb3a3887a706efeffc8752057ae1a6b76c71 (patch)
tree2450aea178916e8c6f34edd49f995ce38c9c02d0 /llvm/lib/IR
parentc3c714ba7eaa9ef839680d774a90a6545d247899 (diff)
downloadbcm5719-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.cpp8
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))
OpenPOWER on IntegriCloud