Add some comparison operators to compare the Attribute object with the AttrKind value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2012-12-31 11:51:54 +00:00
parent 5d0d67f3d1
commit 92e287f5bd
2 changed files with 15 additions and 3 deletions

View File

@@ -120,6 +120,10 @@ public:
/// 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;
}
@@ -141,7 +145,7 @@ public:
/// 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.