[COFF] Stabilize sort

Found by llvm::sort's expensive checks.
This commit is contained in:
Benjamin Kramer 2020-03-28 21:38:50 +01:00
parent ba2e72c54e
commit b578f130a7
1 changed files with 2 additions and 0 deletions

View File

@ -1385,6 +1385,8 @@ void PDBLinker::printStats() {
TypeIndex typeIndex;
uint64_t totalInputSize() const { return uint64_t(dupCount) * typeSize; }
bool operator<(const TypeSizeInfo &rhs) const {
if (totalInputSize() == rhs.totalInputSize())
return typeIndex < rhs.typeIndex;
return totalInputSize() < rhs.totalInputSize();
}
};