summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-03 01:54:39 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-03 01:54:39 +0000
commit04949fa99810054766741ffb4a186b7014557a54 (patch)
tree57842611c7011772262cd76206d212a04253550e /llvm/lib/IR/AttributeImpl.h
parentb168708ad8824bb01677165298828583c9e49973 (diff)
downloadbcm5719-llvm-04949fa99810054766741ffb4a186b7014557a54.tar.gz
bcm5719-llvm-04949fa99810054766741ffb4a186b7014557a54.zip
Try again to revert the bad patch. The tree was reverted for some unknown reason
before the last time. --- Reverse-merging r171442 into '.': U include/llvm/IR/Attributes.h U lib/IR/Attributes.cpp U lib/IR/AttributeImpl.h llvm-svn: 171448
Diffstat (limited to 'llvm/lib/IR/AttributeImpl.h')
-rw-r--r--llvm/lib/IR/AttributeImpl.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index 015bb9df3e6..2633608926f 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/lib/IR/AttributeImpl.h
@@ -42,6 +42,9 @@ public:
return Vals;
}
+ bool contains(Attribute::AttrKind Kind) const;
+ bool contains(StringRef Kind) const;
+
bool hasAttribute(Attribute::AttrKind A) const;
bool hasAttributes() const;
@@ -50,11 +53,19 @@ public:
uint64_t getAlignment() const;
uint64_t getStackAlignment() const;
- bool operator==(Attribute::AttrKind Kind) const;
- bool operator!=(Attribute::AttrKind Kind) const;
+ bool operator==(Attribute::AttrKind Kind) const {
+ return contains(Kind);
+ }
+ bool operator!=(Attribute::AttrKind Kind) const {
+ return !contains(Kind);
+ }
- bool operator==(StringRef Kind) const;
- bool operator!=(StringRef Kind) const;
+ bool operator==(StringRef Kind) const {
+ return contains(Kind);
+ }
+ bool operator!=(StringRef Kind) const {
+ return !contains(Kind);
+ }
uint64_t getBitMask() const; // FIXME: Remove.
OpenPOWER on IntegriCloud