InstrProf: Add operator!= to coverage counters

I'll use this in clang shortly. Also makes the operator definition
style more consistent in this class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner 2015-01-24 21:13:23 +00:00
parent 65a5e71298
commit c937185054

View File

@ -63,8 +63,12 @@ public:
unsigned getExpressionID() const { return ID; } unsigned getExpressionID() const { return ID; }
bool operator==(const Counter &Other) const { friend bool operator==(const Counter &LHS, const Counter &RHS) {
return Kind == Other.Kind && ID == Other.ID; return LHS.Kind == RHS.Kind && LHS.ID == RHS.ID;
}
friend bool operator!=(const Counter &LHS, const Counter &RHS) {
return !(LHS == RHS);
} }
friend bool operator<(const Counter &LHS, const Counter &RHS) { friend bool operator<(const Counter &LHS, const Counter &RHS) {