diff options
| author | Teresa Johnson <tejohnson@google.com> | 2018-06-06 18:32:16 +0000 | 
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2018-06-06 18:32:16 +0000 | 
| commit | 9e46c6da69454d0877015c07f7fc4e9b42bb07e1 (patch) | |
| tree | e453cc6638f39b51ff07b0f998ef6ff1211572cc | |
| parent | 7a48bb6e442dbfd052ae15d44540271752b2de8d (diff) | |
| download | bcm5719-llvm-9e46c6da69454d0877015c07f7fc4e9b42bb07e1.tar.gz bcm5719-llvm-9e46c6da69454d0877015c07f7fc4e9b42bb07e1.zip  | |
[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
| -rw-r--r-- | llvm/include/llvm/IR/ModuleSummaryIndex.h | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h index 8c858fc0b69..3ea22561987 100644 --- a/llvm/include/llvm/IR/ModuleSummaryIndex.h +++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h @@ -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) {  | 

