mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Use llvm::sort. NFC
llvm-svn: 361134
This commit is contained in:
parent
ce40cc53f3
commit
ee70dcee59
@ -47,10 +47,9 @@ Error DebugFrameDataSubsection::commit(BinaryStreamWriter &Writer) const {
|
||||
}
|
||||
|
||||
std::vector<FrameData> SortedFrames(Frames.begin(), Frames.end());
|
||||
std::sort(SortedFrames.begin(), SortedFrames.end(),
|
||||
[](const FrameData &LHS, const FrameData &RHS) {
|
||||
return LHS.RvaStart < RHS.RvaStart;
|
||||
});
|
||||
llvm::sort(SortedFrames, [](const FrameData &LHS, const FrameData &RHS) {
|
||||
return LHS.RvaStart < RHS.RvaStart;
|
||||
});
|
||||
if (auto EC = Writer.writeArray(makeArrayRef(SortedFrames)))
|
||||
return EC;
|
||||
return Error::success();
|
||||
|
@ -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) {
|
||||
|
@ -649,7 +649,7 @@ unsigned GCNRegBankReassign::tryReassign(Candidate &C) {
|
||||
}
|
||||
}
|
||||
}
|
||||
std::sort(BankStalls.begin(), BankStalls.end());
|
||||
llvm::sort(BankStalls);
|
||||
|
||||
unsigned OrigReg = VRM->getPhys(C.Reg);
|
||||
LRM->unassign(LI);
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include <algorithm> // std::sort
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user