diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index 4ee5814a9cc..5eca5d6d087 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -134,6 +134,9 @@ public: bool operator==(AttrKind K) const; bool operator!=(AttrKind K) const; + bool operator==(Attribute A) const { return pImpl == A.pImpl; } + bool operator!=(Attribute A) const { return pImpl != A.pImpl; } + /// \brief Less-than operator. Useful for sorting the attributes list. bool operator<(Attribute A) const;