[llvm-commits] [llvm] r171252 - in /llvm/trunk: include/llvm/Attributes.h lib/Target/CppBackend/CPPBackend.cpp lib/VMCore/Attributes.cpp

Bill Wendling isanbard at gmail.com
Sun Dec 30 01:17:46 PST 2012


Author: void
Date: Sun Dec 30 03:17:46 2012
New Revision: 171252

URL: http://llvm.org/viewvc/llvm-project?rev=171252&view=rev
Log:
s/hasAttribute/contains/g to be more consistent with other method names.

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

Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=171252&r1=171251&r2=171252&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Sun Dec 30 03:17:46 2012
@@ -176,8 +176,8 @@
   /// 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;

Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=171252&r1=171251&r2=171252&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Sun Dec 30 03:17:46 2012
@@ -479,7 +479,7 @@
       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 @@
       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!");

Modified: llvm/trunk/lib/VMCore/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=171252&r1=171251&r2=171252&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Attributes.cpp (original)
+++ llvm/trunk/lib/VMCore/Attributes.cpp Sun Dec 30 03:17:46 2012
@@ -266,7 +266,7 @@
   return *this;
 }
 
-bool AttrBuilder::hasAttribute(Attribute::AttrKind A) const {
+bool AttrBuilder::contains(Attribute::AttrKind A) const {
   return Bits & AttributeImpl::getAttrMask(A);
 }
 





More information about the llvm-commits mailing list