projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
InstrProf: Add operator!= to coverage counters
[oota-llvm.git]
/
include
/
llvm
/
ProfileData
/
CoverageMapping.h
diff --git
a/include/llvm/ProfileData/CoverageMapping.h
b/include/llvm/ProfileData/CoverageMapping.h
index 38fc8ca7c77c54969cc3885a4dccf38f9c57462d..7c88977cb29e02f311fea21b88fd9490855f4543 100644
(file)
--- a/
include/llvm/ProfileData/CoverageMapping.h
+++ b/
include/llvm/ProfileData/CoverageMapping.h
@@
-19,6
+19,7
@@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/iterator.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/raw_ostream.h"
#include <system_error>
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/raw_ostream.h"
#include <system_error>
@@
-62,8
+63,12
@@
public:
unsigned getExpressionID() const { return ID; }
unsigned getExpressionID() const { return ID; }
- bool operator==(const Counter &Other) const {
- return Kind == Other.Kind && ID == Other.ID;
+ friend bool operator==(const Counter &LHS, const Counter &RHS) {
+ 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) {
@@
-217,7
+222,7
@@
public:
: Expressions(Expressions), CounterValues(CounterValues) {}
void dump(const Counter &C, llvm::raw_ostream &OS) const;
: Expressions(Expressions), CounterValues(CounterValues) {}
void dump(const Counter &C, llvm::raw_ostream &OS) const;
- void dump(const Counter &C) const { dump(C,
llvm::out
s()); }
+ void dump(const Counter &C) const { dump(C,
dbg
s()); }
/// \brief Return the number of times that a region of code associated with
/// this counter was executed.
/// \brief Return the number of times that a region of code associated with
/// this counter was executed.