forked from OSchip/llvm-project
Remove the Attribute::hasAttributes() function.
That function doesn't make sense anymore because there's only one attribute per Attribute object now. llvm-svn: 174044
This commit is contained in:
parent
4bca85204e
commit
d471863c1e
|
@ -129,9 +129,6 @@ public:
|
||||||
/// \brief Return true if the attribute is present.
|
/// \brief Return true if the attribute is present.
|
||||||
bool hasAttribute(AttrKind Val) const;
|
bool hasAttribute(AttrKind Val) const;
|
||||||
|
|
||||||
/// \brief Return true if attributes exist
|
|
||||||
bool hasAttributes() const;
|
|
||||||
|
|
||||||
/// \brief Return the kind of this attribute.
|
/// \brief Return the kind of this attribute.
|
||||||
Constant *getAttributeKind() const;
|
Constant *getAttributeKind() const;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ public:
|
||||||
AttributeImpl(LLVMContext &C, StringRef data);
|
AttributeImpl(LLVMContext &C, StringRef data);
|
||||||
|
|
||||||
bool hasAttribute(Attribute::AttrKind A) const;
|
bool hasAttribute(Attribute::AttrKind A) const;
|
||||||
bool hasAttributes() const;
|
|
||||||
|
|
||||||
Constant *getAttributeKind() const { return Kind; }
|
Constant *getAttributeKind() const { return Kind; }
|
||||||
ArrayRef<Constant*> getAttributeValues() const { return Vals; }
|
ArrayRef<Constant*> getAttributeValues() const { return Vals; }
|
||||||
|
|
|
@ -82,10 +82,6 @@ bool Attribute::hasAttribute(AttrKind Val) const {
|
||||||
return pImpl && pImpl->hasAttribute(Val);
|
return pImpl && pImpl->hasAttribute(Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Attribute::hasAttributes() const {
|
|
||||||
return pImpl && pImpl->hasAttributes();
|
|
||||||
}
|
|
||||||
|
|
||||||
Constant *Attribute::getAttributeKind() const {
|
Constant *Attribute::getAttributeKind() const {
|
||||||
return pImpl ? pImpl->getAttributeKind() : 0;
|
return pImpl ? pImpl->getAttributeKind() : 0;
|
||||||
}
|
}
|
||||||
|
@ -226,10 +222,6 @@ bool AttributeImpl::hasAttribute(Attribute::AttrKind A) const {
|
||||||
return (Raw() & getAttrMask(A)) != 0;
|
return (Raw() & getAttrMask(A)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AttributeImpl::hasAttributes() const {
|
|
||||||
return Raw() != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t AttributeImpl::getAlignment() const {
|
uint64_t AttributeImpl::getAlignment() const {
|
||||||
uint64_t Mask = Raw() & getAttrMask(Attribute::Alignment);
|
uint64_t Mask = Raw() & getAttrMask(Attribute::Alignment);
|
||||||
return 1ULL << ((Mask >> 16) - 1);
|
return 1ULL << ((Mask >> 16) - 1);
|
||||||
|
@ -454,7 +446,7 @@ AttributeSet AttributeSet::get(LLVMContext &C,
|
||||||
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
|
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
|
||||||
assert((!i || Attrs[i-1].first <= Attrs[i].first) &&
|
assert((!i || Attrs[i-1].first <= Attrs[i].first) &&
|
||||||
"Misordered Attributes list!");
|
"Misordered Attributes list!");
|
||||||
assert(Attrs[i].second.hasAttributes() &&
|
assert(Attrs[i].second != Attribute::None &&
|
||||||
"Pointless attribute!");
|
"Pointless attribute!");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue