Skip to content

Commit c7bacc9

Browse files
authored
[llvm] using wrapper llvm::sort(nfc) (#151000)
using wrapper llvm::sort(nfc)
1 parent d6c2e53 commit c7bacc9

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

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

llvm/lib/IR/AsmWriter.cpp

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

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)