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 | 5db224e1f041e2d21bbf4eb0db7a1e8c0cd8439d (patch) | |
tree | d3845b46a7856215e5d20896f5371b9b039de1f6 /llvm/lib/IR/AttributeImpl.h | |
parent | adc79395252d2c417224985833ba70acf36e8318 (diff) | |
download | bcm5719-llvm-5db224e1f041e2d21bbf4eb0db7a1e8c0cd8439d.tar.gz bcm5719-llvm-5db224e1f041e2d21bbf4eb0db7a1e8c0cd8439d.zip |
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
llvm-svn: 272504
Diffstat (limited to 'llvm/lib/IR/AttributeImpl.h')
-rw-r--r-- | llvm/lib/IR/AttributeImpl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h index 7b4b3bb18e7..45e6337e8ab 100644 --- a/llvm/lib/IR/AttributeImpl.h +++ b/llvm/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; } |