[PATCH] D104346: [lld][MachO] Sort symbols in parallel in -map
Xuanda Yang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 16 18:46:46 PDT 2021
TH3CHARLie updated this revision to Diff 352600.
TH3CHARLie added a comment.
update
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104346/new/
https://reviews.llvm.org/D104346
Files:
lld/MachO/MapFile.cpp
Index: lld/MachO/MapFile.cpp
===================================================================
--- lld/MachO/MapFile.cpp
+++ lld/MachO/MapFile.cpp
@@ -52,9 +52,11 @@
// appear in the output file rather than the order they appeared in the input
// files.
for (auto &it : ret)
- llvm::stable_sort(it.second, [](Defined *a, Defined *b) {
- return a->getVA() < b->getVA();
- });
+ parallelSort(
+ it.second.begin(), it.second.end(), [](Defined *a, Defined *b) {
+ return a->getVA() != b->getVA() ? a->getVA() < b->getVA()
+ : a->getName() < b->getName();
+ });
return ret;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104346.352600.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210617/9bbb3402/attachment.bin>
More information about the llvm-commits
mailing list