Skip to content

Commit f71e25b

Browse files
[memprof] Simplify IndexedMemProfRecord::operator== (NFC) (#88986)
llvm::SmallVector::operator== exactly meets our needs.
1 parent 6a4eaf9 commit f71e25b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,9 @@ struct IndexedMemProfRecord {
370370
size_t serializedSize(IndexedVersion Version) const;
371371

372372
bool operator==(const IndexedMemProfRecord &Other) const {
373-
if (Other.AllocSites.size() != AllocSites.size())
373+
if (Other.AllocSites != AllocSites)
374374
return false;
375375

376-
for (size_t I = 0; I < AllocSites.size(); I++) {
377-
if (AllocSites[I] != Other.AllocSites[I])
378-
return false;
379-
}
380-
381376
if (Other.CallSiteIds != CallSiteIds)
382377
return false;
383378
return true;

0 commit comments

Comments
 (0)