diff options
author | Amaury Sechet <deadalnix@gmail.com> | 2016-06-12 06:17:24 +0000 |
---|---|---|
committer | Amaury Sechet <deadalnix@gmail.com> | 2016-06-12 06:17:24 +0000 |
commit | ca669104bfa390d36d1657d4f84147c8f27711c7 (patch) | |
tree | a5fd2b19fbd02eb3ff77102d968d4d18bacce75b /lib/IR/AttributeImpl.h | |
parent | 5f6317b29370f4f63f1e1f13155e211fa084c04f (diff) |
Make sure we have a Add/Remove/Has function for various thing that can have attribute.
Summary: This also deprecated the get attribute function familly.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight
Subscribers: axw, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19181
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r-- | lib/IR/AttributeImpl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h index 7b4b3bb18e7..45e6337e8ab 100644 --- a/lib/IR/AttributeImpl.h +++ b/lib/IR/AttributeImpl.h @@ -177,6 +177,9 @@ public: static AttributeSetNode *get(LLVMContext &C, ArrayRef<Attribute> Attrs); + /// \brief Return the number of attributes this AttributeSet contains. + unsigned getNumAttributes() const { return NumAttrs; } + bool hasAttribute(Attribute::AttrKind Kind) const { return AvailableAttrs & ((uint64_t)1) << Kind; } |