projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3adf585
)
InstrProf: Make coverage::Counter comparable
author
Justin Bogner
<mail@justinbogner.com>
Wed, 1 Oct 2014 03:31:58 +0000
(
03:31
+0000)
committer
Justin Bogner
<mail@justinbogner.com>
Wed, 1 Oct 2014 03:31:58 +0000
(
03:31
+0000)
I'll be using this in a clang change very soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218736
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ProfileData/CoverageMapping.h
patch
|
blob
|
history
diff --git
a/include/llvm/ProfileData/CoverageMapping.h
b/include/llvm/ProfileData/CoverageMapping.h
index 617afd4df28ef3cc0c938d22693c81c0f1c5f6e1..6d833648a17aac709fed5f6edfc7060a7a7739a8 100644
(file)
--- a/
include/llvm/ProfileData/CoverageMapping.h
+++ b/
include/llvm/ProfileData/CoverageMapping.h
@@
-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(); }