aboutsummaryrefslogtreecommitdiff
path: root/lld/ELF/SyntheticSections.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-01-16 21:44:19 -0800
committerFangrui Song <i@maskray.me>2022-01-16 21:44:19 -0800
commitaad90763d9046cb0bc6abc6214a496a4a5776250 (patch)
treedbac09b69d7d5ceeda06930621ea0e18dd670260 /lld/ELF/SyntheticSections.cpp
parent61106ca7525663ec2ed08c5f304d6fb6946744f7 (diff)
downloadllvm-aad90763d9046cb0bc6abc6214a496a4a5776250.zip
llvm-aad90763d9046cb0bc6abc6214a496a4a5776250.tar.gz
llvm-aad90763d9046cb0bc6abc6214a496a4a5776250.tar.bz2
[ELF] RelocationSection<ELFT>::writeTo: use unstable partition
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
-rw-r--r--lld/ELF/SyntheticSections.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 9944877..2bb94b5 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1710,8 +1710,7 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *buf) {
if (sort) {
const RelType relativeRel = target->relativeRel;
auto nonRelative =
- std::stable_partition(relocs.begin(), relocs.end(),
- [=](auto &r) { return r.type == relativeRel; });
+ llvm::partition(relocs, [=](auto &r) { return r.type == relativeRel; });
parallelSort(relocs.begin(), nonRelative,
[&](auto &a, auto &b) { return a.r_offset < b.r_offset; });
// Non-relative relocations are few, so don't bother with parallelSort.