forked from OSchip/llvm-project
InstrProf: Make coverage::Counter comparable
I'll be using this in a clang change very soon. llvm-svn: 218736
This commit is contained in:
parent
19fc3dafc8
commit
4cb371dc12
|
@ -63,6 +63,10 @@ public:
|
|||
return Kind == Other.Kind && ID == Other.ID;
|
||||
}
|
||||
|
||||
friend bool operator<(const Counter &LHS, const Counter &RHS) {
|
||||
return std::tie(LHS.Kind, LHS.ID) < std::tie(RHS.Kind, RHS.ID);
|
||||
}
|
||||
|
||||
/// \brief Return the counter that represents the number zero.
|
||||
static Counter getZero() { return Counter(); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue