summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JITLink
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-20 10:18:35 +0000
committerFangrui Song <maskray@google.com>2019-05-20 10:18:35 +0000
commit68774edcd65a310aadbaaffa7a63a416eef7cede (patch)
tree1f20666b8613450ddaa2a906b08a8584d78e95d7 /llvm/lib/ExecutionEngine/JITLink
parentf83cccf917c1c0db45bfaa6728793eb106dda8af (diff)
downloadbcm5719-llvm-68774edcd65a310aadbaaffa7a63a416eef7cede.tar.gz
bcm5719-llvm-68774edcd65a310aadbaaffa7a63a416eef7cede.zip
Use llvm::sort. NFC
llvm-svn: 361134
Diffstat (limited to 'llvm/lib/ExecutionEngine/JITLink')
-rw-r--r--llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
index 96e074da122..c20b4714e2b 100644
--- a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
@@ -158,10 +158,8 @@ void JITLinkerBase::layOutAtoms() {
};
for (auto &KV : Layout) {
auto &SL = KV.second;
- std::sort(SL.ContentSections.begin(), SL.ContentSections.end(),
- CompareByOrdinal);
- std::sort(SL.ZeroFillSections.begin(), SL.ZeroFillSections.end(),
- CompareByOrdinal);
+ llvm::sort(SL.ContentSections, CompareByOrdinal);
+ llvm::sort(SL.ZeroFillSections, CompareByOrdinal);
}
}
@@ -188,10 +186,10 @@ void JITLinkerBase::layOutAtoms() {
OrderedLayoutHeads.push_back(DA);
// Now sort the list of layout heads by address.
- std::sort(OrderedLayoutHeads.begin(), OrderedLayoutHeads.end(),
- [](const DefinedAtom *LHS, const DefinedAtom *RHS) {
- return LHS->getAddress() < RHS->getAddress();
- });
+ llvm::sort(OrderedLayoutHeads,
+ [](const DefinedAtom *LHS, const DefinedAtom *RHS) {
+ return LHS->getAddress() < RHS->getAddress();
+ });
// Now populate the SI.Atoms field by appending each of the chains.
for (auto *DA : OrderedLayoutHeads) {
OpenPOWER on IntegriCloud