Skip to content

Commit 95e19a5

Browse files
committed
[llvm] using wrapper llvm::sort(nfc)
using wrapper llvm::sort(nfc)
1 parent 4b9f622 commit 95e19a5

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ class IndexBitcodeWriter : public BitcodeWriterBase {
609609
std::vector<StringRef> ModulePaths;
610610
for (auto &[ModPath, _] : Index.modulePaths())
611611
ModulePaths.push_back(ModPath);
612-
llvm::sort(ModulePaths.begin(), ModulePaths.end());
612+
llvm::sort(ModulePaths);
613613
for (auto &ModPath : ModulePaths)
614614
Callback(*Index.modulePaths().find(ModPath));
615615
}

llvm/lib/CodeGen/MIRPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static void convertCallSiteObjects(yaml::MachineFunction &YMF,
547547
}
548548

549549
// Sort call info by position of call instructions.
550-
llvm::sort(YMF.CallSitesInfo.begin(), YMF.CallSitesInfo.end(),
550+
llvm::sort(YMF.CallSitesInfo,
551551
[](yaml::CallSiteInfo A, yaml::CallSiteInfo B) {
552552
return std::tie(A.CallLocation.BlockNum, A.CallLocation.Offset) <
553553
std::tie(B.CallLocation.BlockNum, B.CallLocation.Offset);

llvm/lib/IR/AsmWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ int SlotTracker::processIndex() {
11601160
std::vector<StringRef> ModulePaths;
11611161
for (auto &[ModPath, _] : TheIndex->modulePaths())
11621162
ModulePaths.push_back(ModPath);
1163-
llvm::sort(ModulePaths.begin(), ModulePaths.end());
1163+
llvm::sort(ModulePaths);
11641164
for (auto &ModPath : ModulePaths)
11651165
CreateModulePathSlot(ModPath);
11661166

llvm/lib/Support/BalancedPartitioning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void BalancedPartitioning::split(const FunctionNodeRange Nodes,
306306
unsigned NumNodes = std::distance(Nodes.begin(), Nodes.end());
307307
auto NodesMid = Nodes.begin() + (NumNodes + 1) / 2;
308308

309-
llvm::sort(Nodes.begin(), Nodes.end(), [](auto &L, auto &R) {
309+
llvm::sort(Nodes, [](auto &L, auto &R) {
310310
return L.InputOrderIndex < R.InputOrderIndex;
311311
});
312312

llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ cl::opt<LoweringKind> LoweringKindLoc(
236236
"Lower via mixture of above strategies")));
237237

238238
template <typename T> std::vector<T> sortByName(std::vector<T> &&V) {
239-
llvm::sort(V.begin(), V.end(), [](const auto *L, const auto *R) {
239+
llvm::sort(V, [](const auto *L, const auto *R) {
240240
return L->getName() < R->getName();
241241
});
242242
return {std::move(V)};

llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ SmallVector<uint32_t, 8> HvxSelector::getPerfectCompletions(ShuffleMask SM,
19871987
// times). In such cases it will be impossible to complete this to a
19881988
// perfect shuffle.
19891989
SmallVector<uint32_t, 8> Sorted(Worklist);
1990-
llvm::sort(Sorted.begin(), Sorted.end());
1990+
llvm::sort(Sorted);
19911991

19921992
for (unsigned I = 0, E = Sorted.size(); I != E;) {
19931993
unsigned P = Sorted[I], Count = 1;

llvm/lib/Transforms/Scalar/GVNSink.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class InstructionUseExpr : public GVNExpression::BasicExpression {
308308

309309
for (auto &U : I->uses())
310310
op_push_back(U.getUser());
311-
llvm::sort(op_begin(), op_end());
311+
llvm::sort(operands());
312312
}
313313

314314
void setMemoryUseOrder(unsigned MUO) { MemoryUseOrder = MUO; }

0 commit comments

Comments
 (0)