forked from OSchip/llvm-project
[ThinLTO] Make ValueInfo operator!= consistent with operator== (NFC)
Compare Ref pointers instead of GUID, to handle comparison with special empty/tombstone ValueInfo. This was already done for operator==, to support inserting ValueInfo into DenseMap, but I need the operator!= side change for upcoming AsmParser summary parsing support. llvm-svn: 334111
This commit is contained in:
parent
7a48bb6e44
commit
9e46c6da69
|
@ -179,14 +179,14 @@ struct ValueInfo {
|
|||
|
||||
inline bool operator==(const ValueInfo &A, const ValueInfo &B) {
|
||||
assert(A.getRef() && B.getRef() &&
|
||||
"Need ValueInfo with non-null Ref to compare GUIDs");
|
||||
"Need ValueInfo with non-null Ref for comparison");
|
||||
return A.getRef() == B.getRef();
|
||||
}
|
||||
|
||||
inline bool operator!=(const ValueInfo &A, const ValueInfo &B) {
|
||||
assert(A.getRef() && B.getRef() &&
|
||||
"Need ValueInfo with non-null Ref to compare GUIDs");
|
||||
return A.getGUID() != B.getGUID();
|
||||
"Need ValueInfo with non-null Ref for comparison");
|
||||
return A.getRef() != B.getRef();
|
||||
}
|
||||
|
||||
inline bool operator<(const ValueInfo &A, const ValueInfo &B) {
|
||||
|
|
Loading…
Reference in New Issue