[llvm] r174044 - Remove the Attribute::hasAttributes() function.
Bill Wendling
isanbard at gmail.com
Wed Jan 30 22:22:35 PST 2013
Author: void
Date: Thu Jan 31 00:22:35 2013
New Revision: 174044
URL: http://llvm.org/viewvc/llvm-project?rev=174044&view=rev
Log:
Remove the Attribute::hasAttributes() function.
That function doesn't make sense anymore because there's only one attribute per
Attribute object now.
Modified:
llvm/trunk/include/llvm/IR/Attributes.h
llvm/trunk/lib/IR/AttributeImpl.h
llvm/trunk/lib/IR/Attributes.cpp
Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=174044&r1=174043&r2=174044&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Thu Jan 31 00:22:35 2013
@@ -129,9 +129,6 @@ public:
/// \brief Return true if the attribute is present.
bool hasAttribute(AttrKind Val) const;
- /// \brief Return true if attributes exist
- bool hasAttributes() const;
-
/// \brief Return the kind of this attribute.
Constant *getAttributeKind() const;
Modified: llvm/trunk/lib/IR/AttributeImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=174044&r1=174043&r2=174044&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AttributeImpl.h (original)
+++ llvm/trunk/lib/IR/AttributeImpl.h Thu Jan 31 00:22:35 2013
@@ -46,7 +46,6 @@ public:
AttributeImpl(LLVMContext &C, StringRef data);
bool hasAttribute(Attribute::AttrKind A) const;
- bool hasAttributes() const;
Constant *getAttributeKind() const { return Kind; }
ArrayRef<Constant*> getAttributeValues() const { return Vals; }
Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=174044&r1=174043&r2=174044&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Thu Jan 31 00:22:35 2013
@@ -82,10 +82,6 @@ bool Attribute::hasAttribute(AttrKind Va
return pImpl && pImpl->hasAttribute(Val);
}
-bool Attribute::hasAttributes() const {
- return pImpl && pImpl->hasAttributes();
-}
-
Constant *Attribute::getAttributeKind() const {
return pImpl ? pImpl->getAttributeKind() : 0;
}
@@ -226,10 +222,6 @@ bool AttributeImpl::hasAttribute(Attribu
return (Raw() & getAttrMask(A)) != 0;
}
-bool AttributeImpl::hasAttributes() const {
- return Raw() != 0;
-}
-
uint64_t AttributeImpl::getAlignment() const {
uint64_t Mask = Raw() & getAttrMask(Attribute::Alignment);
return 1ULL << ((Mask >> 16) - 1);
@@ -454,7 +446,7 @@ AttributeSet AttributeSet::get(LLVMConte
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
assert((!i || Attrs[i-1].first <= Attrs[i].first) &&
"Misordered Attributes list!");
- assert(Attrs[i].second.hasAttributes() &&
+ assert(Attrs[i].second != Attribute::None &&
"Pointless attribute!");
}
#endif
More information about the llvm-commits
mailing list