/// alignment value.
unsigned getStackAlignment() const;
+ bool operator==(AttrKind K) const;
+ bool operator!=(AttrKind K) const;
+
+ // FIXME: Remove these 'operator' methods.
bool operator==(const Attribute &A) const {
return pImpl == A.pImpl;
}
/// that have been decoded from the given integer. This function must stay in
/// sync with 'encodeLLVMAttributesForBitcode'.
static Attribute decodeLLVMAttributesForBitcode(LLVMContext &C,
- uint64_t EncodedAttrs);
+ uint64_t EncodedAttrs);
/// \brief The Attribute is converted to a string of equivalent mnemonic. This
/// is, presumably, for writing out the mnemonics for the assembly writer.
return 1U << ((pImpl->getStackAlignment() >> 26) - 1);
}
+bool Attribute::operator==(AttrKind K) const {
+ return pImpl && pImpl->contains(K);
+}
+
+bool Attribute::operator!=(AttrKind K) const {
+ return !(pImpl && pImpl->contains(K));
+}
+
uint64_t Attribute::getBitMask() const {
return pImpl ? pImpl->getBitMask() : 0;
}
}
/// getAttributes - The attributes for the specified index are returned.
-/// Attribute for the result are denoted with Idx = 0. Function notes are
-/// denoted with idx = ~0.
+/// Attributes for the result are denoted with Idx = 0. Function attributes are
+/// denoted with Idx = ~0.
Attribute AttributeSet::getAttributes(unsigned Idx) const {
if (AttrList == 0) return Attribute();