aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-13 08:42:21 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-13 08:42:21 +0000
commit0e9d5d059c4aa959e9ef4dff011dbd38d45a1016 (patch)
tree6285ed6170465ecafbd34e65f5a0b075b7dea5a3 /include
parent80806961035807d1b9566cdd34233c1b4cf49282 (diff)
downloadexternal_llvm-0e9d5d059c4aa959e9ef4dff011dbd38d45a1016.zip
external_llvm-0e9d5d059c4aa959e9ef4dff011dbd38d45a1016.tar.gz
external_llvm-0e9d5d059c4aa959e9ef4dff011dbd38d45a1016.tar.bz2
Add some accessor and query methods for retrieving Attribute objects and such.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/IR/Attributes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h
index c8be27c..b6ca1ad 100644
--- a/include/llvm/IR/Attributes.h
+++ b/include/llvm/IR/Attributes.h
@@ -303,6 +303,9 @@ public:
/// \brief Return true if the attribute exists at the given index.
bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const;
+ /// \brief Return true if the attribute exists at the given index.
+ bool hasAttribute(unsigned Index, StringRef Kind) const;
+
/// \brief Return true if attribute exists at the given index.
bool hasAttributes(unsigned Index) const;
@@ -310,6 +313,12 @@ public:
/// parameter or for the return value.
bool hasAttrSomewhere(Attribute::AttrKind Attr) const;
+ /// \brief Return the attribute object that exists at the given index.
+ Attribute getAttribute(unsigned Index, Attribute::AttrKind Kind) const;
+
+ /// \brief Return the attribute object that exists at the given index.
+ Attribute getAttribute(unsigned Index, StringRef Kind) const;
+
/// \brief Return the alignment for the specified function parameter.
unsigned getParamAlignment(unsigned Idx) const;