<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 24, 2015 at 1:13 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: bogner<br>
Date: Sat Jan 24 15:13:23 2015<br>
New Revision: 227018<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=227018&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=227018&view=rev</a><br>
Log:<br>
InstrProf: Add operator!= to coverage counters<br>
<br>
I'll use this in clang shortly. Also makes the operator definition<br>
style more consistent in this class.<br></blockquote><div><br>Test cases?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
    llvm/trunk/include/llvm/ProfileData/CoverageMapping.h<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/CoverageMapping.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/CoverageMapping.h?rev=227018&r1=227017&r2=227018&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/CoverageMapping.h?rev=227018&r1=227017&r2=227018&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/CoverageMapping.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/CoverageMapping.h Sat Jan 24 15:13:23 2015<br>
@@ -63,8 +63,12 @@ public:<br>
<br>
   unsigned getExpressionID() const { return ID; }<br>
<br>
-  bool operator==(const Counter &Other) const {<br>
-    return Kind == Other.Kind && ID == Other.ID;<br>
+  friend bool operator==(const Counter &LHS, const Counter &RHS) {<br>
+    return LHS.Kind == RHS.Kind && <a href="http://LHS.ID" target="_blank">LHS.ID</a> == <a href="http://RHS.ID" target="_blank">RHS.ID</a>;<br>
+  }<br>
+<br>
+  friend bool operator!=(const Counter &LHS, const Counter &RHS) {<br>
+    return !(LHS == RHS);<br>
   }<br>
<br>
   friend bool operator<(const Counter &LHS, const Counter &RHS) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>