projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba2e72c
)
[COFF] Stabilize sort
author
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 28 Mar 2020 20:38:50 +0000
(21:38 +0100)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 28 Mar 2020 20:38:50 +0000
(21:38 +0100)
Found by llvm::sort's expensive checks.
lld/COFF/PDB.cpp
patch
|
blob
|
history
diff --git
a/lld/COFF/PDB.cpp
b/lld/COFF/PDB.cpp
index
3754bd0
..
8ecfdca
100644
(file)
--- a/
lld/COFF/PDB.cpp
+++ b/
lld/COFF/PDB.cpp
@@
-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();
}
};