<div dir="ltr">Test case? (maybe a unit test if this isn't exercised otherwise yet)</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 6, 2018 at 11:36 AM Teresa Johnson via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: tejohnson<br>
Date: Wed Jun  6 11:32:16 2018<br>
New Revision: 334111<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=334111&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=334111&view=rev</a><br>
Log:<br>
[ThinLTO] Make ValueInfo operator!= consistent with operator== (NFC)<br>
<br>
Compare Ref pointers instead of GUID, to handle comparison with special<br>
empty/tombstone ValueInfo. This was already done for operator==, to<br>
support inserting ValueInfo into DenseMap, but I need the operator!=<br>
side change for upcoming AsmParser summary parsing support.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h<br>
<br>
Modified: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h?rev=334111&r1=334110&r2=334111&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h?rev=334111&r1=334110&r2=334111&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h (original)<br>
+++ llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h Wed Jun  6 11:32:16 2018<br>
@@ -179,14 +179,14 @@ struct ValueInfo {<br>
<br>
 inline bool operator==(const ValueInfo &A, const ValueInfo &B) {<br>
   assert(A.getRef() && B.getRef() &&<br>
-         "Need ValueInfo with non-null Ref to compare GUIDs");<br>
+         "Need ValueInfo with non-null Ref for comparison");<br>
   return A.getRef() == B.getRef();<br>
 }<br>
<br>
 inline bool operator!=(const ValueInfo &A, const ValueInfo &B) {<br>
   assert(A.getRef() && B.getRef() &&<br>
-         "Need ValueInfo with non-null Ref to compare GUIDs");<br>
-  return A.getGUID() != B.getGUID();<br>
+         "Need ValueInfo with non-null Ref for comparison");<br>
+  return A.getRef() != B.getRef();<br>
 }<br>
<br>
 inline bool operator<(const ValueInfo &A, const ValueInfo &B) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>