Skip to content

Commit b578f13

Browse files
committed
[COFF] Stabilize sort
Found by llvm::sort's expensive checks.
1 parent ba2e72c commit b578f13

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lld/COFF/PDB.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,8 @@ void PDBLinker::printStats() {
13851385
TypeIndex typeIndex;
13861386
uint64_t totalInputSize() const { return uint64_t(dupCount) * typeSize; }
13871387
bool operator<(const TypeSizeInfo &rhs) const {
1388+
if (totalInputSize() == rhs.totalInputSize())
1389+
return typeIndex < rhs.typeIndex;
13881390
return totalInputSize() < rhs.totalInputSize();
13891391
}
13901392
};

0 commit comments

Comments
 (0)