aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-30 09:17:46 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-30 09:17:46 +0000
commit377660355ccdde389eb4f473bbb24125f160ea23 (patch)
treef660528d15a54d7a6a9c68302c1b440977726604 /lib
parentdb2367512e87dbd7b93c3250ef30c9df5e40cb43 (diff)
s/hasAttribute/contains/g to be more consistent with other method names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp4
-rw-r--r--lib/VMCore/Attributes.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index 0f9ba58295..c2e59f0f2c 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -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!");
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 0db1eb5ed4..b32358708d 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -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);
}