s/hasAttribute/contains/g to be more consistent with other method names.
authorBill Wendling <isanbard@gmail.com>
Sun, 30 Dec 2012 09:17:46 +0000 (09:17 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 30 Dec 2012 09:17:46 +0000 (09:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171252 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Attributes.h
lib/Target/CppBackend/CPPBackend.cpp
lib/VMCore/Attributes.cpp

index cc14e965e2d1e60fdeaf313e57226e1428f5724e..7b621249d72496b702a1d3d214708894fcb5aa7d 100644 (file)
@@ -176,8 +176,8 @@ public:
   /// removeAttribute - Remove the attributes from A from the builder.
   AttrBuilder &removeAttributes(const Attribute &A);
 
-  /// contains - Return true if the builder has the specified attribute.
-  bool hasAttribute(Attribute::AttrKind A) const;
+  /// \brief Return true if the builder has the specified attribute.
+  bool contains(Attribute::AttrKind A) const;
 
   /// hasAttributes - Return true if the builder has IR-level attributes.
   bool hasAttributes() const;
index 0f9ba58295babc684b5834e433c16a9ddd823da2..c2e59f0f2ca1c3a05915f604ab7325e920acdf4a 100644 (file)
@@ -479,7 +479,7 @@ void CppWriter::printAttributes(const AttributeSet &PAL,
       Out << " {\n    AttrBuilder B;\n";
 
 #define HANDLE_ATTR(X)                                     \
-      if (attrs.hasAttribute(Attribute::X))               \
+      if (attrs.contains(Attribute::X))                    \
         Out << "    B.addAttribute(Attribute::" #X ");\n"; \
       attrs.removeAttribute(Attribute::X);
 
@@ -509,7 +509,7 @@ void CppWriter::printAttributes(const AttributeSet &PAL,
       HANDLE_ATTR(NonLazyBind);
       HANDLE_ATTR(MinSize);
 #undef HANDLE_ATTR
-      if (attrs.hasAttribute(Attribute::StackAlignment))
+      if (attrs.contains(Attribute::StackAlignment))
         Out << "    B.addStackAlignmentAttr(" << attrs.getStackAlignment() << ")\n";
       attrs.removeAttribute(Attribute::StackAlignment);
       assert(!attrs.hasAttributes() && "Unhandled attribute!");
index 0db1eb5ed44226271784ae78acb94eaa673c6688..b32358708d808045ade11e4a5350ba35447feef8 100644 (file)
@@ -266,7 +266,7 @@ AttrBuilder &AttrBuilder::removeAttributes(const Attribute &A){
   return *this;
 }
 
-bool AttrBuilder::hasAttribute(Attribute::AttrKind A) const {
+bool AttrBuilder::contains(Attribute::AttrKind A) const {
   return Bits & AttributeImpl::getAttrMask(A);
 }