//===----------------------------------------------------------------------===//
#include "IncludeFixerContext.h"
-#include <algorithm>
+#include "llvm/ADT/STLExtras.h"
namespace clang {
namespace include_fixer {
// QuerySymbolInfos may contain replicated elements. Because CorrectTypo
// callback doesn't always work as we expected. In somecases, it will be
// triggered at the same position or unidentified symbol multiple times.
- std::sort(QuerySymbolInfos.begin(), QuerySymbolInfos.end(),
- [&](const QuerySymbolInfo &A, const QuerySymbolInfo &B) {
- return std::make_pair(A.Range.getOffset(), A.Range.getLength()) <
- std::make_pair(B.Range.getOffset(), B.Range.getLength());
- });
+ llvm::sort(QuerySymbolInfos,
+ [&](const QuerySymbolInfo &A, const QuerySymbolInfo &B) {
+ return std::make_pair(A.Range.getOffset(), A.Range.getLength()) <
+ std::make_pair(B.Range.getOffset(), B.Range.getLength());
+ });
QuerySymbolInfos.erase(
std::unique(QuerySymbolInfos.begin(), QuerySymbolInfos.end(),
[](const QuerySymbolInfo &A, const QuerySymbolInfo &B) {
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Refactoring.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
-#include <algorithm>
#include <string>
namespace clang {
return NewFieldsPositions[LHS->getMember()->getFieldIndex()] <
NewFieldsPositions[RHS->getMember()->getFieldIndex()];
};
- std::sort(std::begin(NewWrittenInitializersOrder),
- std::end(NewWrittenInitializersOrder), ByFieldNewPosition);
+ llvm::sort(NewWrittenInitializersOrder, ByFieldNewPosition);
assert(OldWrittenInitializersOrder.size() ==
NewWrittenInitializersOrder.size());
for (unsigned i = 0, e = NewWrittenInitializersOrder.size(); i < e; ++i)
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Analysis/CFG.h"
#include "clang/Lex/Lexer.h"
+#include "llvm/ADT/STLExtras.h"
#include "../utils/ExprSequence.h"
}
// Sort the uses by their occurrence in the source code.
- std::sort(Uses->begin(), Uses->end(),
- [](const DeclRefExpr *D1, const DeclRefExpr *D2) {
- return D1->getExprLoc() < D2->getExprLoc();
- });
+ llvm::sort(*Uses, [](const DeclRefExpr *D1, const DeclRefExpr *D2) {
+ return D1->getExprLoc() < D2->getExprLoc();
+ });
}
bool isStandardSmartPointer(const ValueDecl *VD) {
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
+#include "llvm/ADT/STLExtras.h"
#include <map>
// Sort the includes. We first sort by priority, then lexicographically.
for (unsigned BI = 0, BE = Blocks.size() - 1; BI != BE; ++BI)
- std::sort(IncludeIndices.begin() + Blocks[BI],
- IncludeIndices.begin() + Blocks[BI + 1],
- [&FileDirectives](unsigned LHSI, unsigned RHSI) {
- IncludeDirective &LHS = FileDirectives[LHSI];
- IncludeDirective &RHS = FileDirectives[RHSI];
-
- int PriorityLHS =
- getPriority(LHS.Filename, LHS.IsAngled, LHS.IsMainModule);
- int PriorityRHS =
- getPriority(RHS.Filename, RHS.IsAngled, RHS.IsMainModule);
-
- return std::tie(PriorityLHS, LHS.Filename) <
- std::tie(PriorityRHS, RHS.Filename);
- });
+ llvm::sort(IncludeIndices.begin() + Blocks[BI],
+ IncludeIndices.begin() + Blocks[BI + 1],
+ [&FileDirectives](unsigned LHSI, unsigned RHSI) {
+ IncludeDirective &LHS = FileDirectives[LHSI];
+ IncludeDirective &RHS = FileDirectives[RHSI];
+
+ int PriorityLHS = getPriority(LHS.Filename, LHS.IsAngled,
+ LHS.IsMainModule);
+ int PriorityRHS = getPriority(RHS.Filename, RHS.IsAngled,
+ RHS.IsMainModule);
+
+ return std::tie(PriorityLHS, LHS.Filename) <
+ std::tie(PriorityRHS, RHS.Filename);
+ });
// Emit a warning for each block and fixits for all changes within that
// block.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
-#include <algorithm>
-
using namespace llvm;
int main(int argc, char *argv[]) {
Entries.emplace_back(CodePoint, To);
}
- std::sort(Entries.begin(), Entries.end());
+ llvm::sort(Entries);
unsigned LargestValue =
std::max_element(Entries.begin(), Entries.end(),
#include "InconsistentDeclarationParameterNameCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "llvm/ADT/STLExtras.h"
-#include <algorithm>
#include <functional>
using namespace clang::ast_matchers;
// Sort in order of appearance in translation unit to generate clear
// diagnostics.
- std::sort(InconsistentDeclarations.begin(), InconsistentDeclarations.end(),
- [&SM](const InconsistentDeclarationInfo &Info1,
- const InconsistentDeclarationInfo &Info2) {
- return SM.isBeforeInTranslationUnit(Info1.DeclarationLocation,
- Info2.DeclarationLocation);
- });
+ llvm::sort(InconsistentDeclarations,
+ [&SM](const InconsistentDeclarationInfo &Info1,
+ const InconsistentDeclarationInfo &Info2) {
+ return SM.isBeforeInTranslationUnit(Info1.DeclarationLocation,
+ Info2.DeclarationLocation);
+ });
return InconsistentDeclarations;
}
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
Sem.LookupVisibleDecls(S, LookupKind, Collector,
/*IncludeGlobalScope=*/false,
/*LoadExternal=*/false);
- std::sort(Scopes.begin(), Scopes.end());
+ llvm::sort(Scopes);
Scopes.erase(std::unique(Scopes.begin(), Scopes.end()), Scopes.end());
return Scopes;
}
#include "clang-pseudo/grammar/LRGraph.h"
#include "clang-pseudo/grammar/LRTable.h"
#include "clang/Basic/TokenKinds.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include <cstdint>
continue;
Table.Reduces.insert(Table.Reduces.end(), It->second.begin(),
It->second.end());
- std::sort(Table.Reduces.begin() + Table.ReduceOffset.back(),
- Table.Reduces.end());
+ llvm::sort(Table.Reduces.begin() + Table.ReduceOffset.back(),
+ Table.Reduces.end());
}
Table.ReduceOffset.push_back(Table.Reduces.size());
#include "llvm/IR/Type.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
-#include <algorithm> // std::sort
+#include <algorithm>
using namespace clang;
using namespace CodeGen;
#include "clang/Tooling/Transformer/RangeSelector.h"
#include "clang/Tooling/Transformer/RewriteRule.h"
#include "clang/Tooling/Transformer/Stencil.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "gmock/gmock.h"
"clang-tool", std::make_shared<PCHContainerOperations>(),
{{"input.h", Header}}));
- std::sort(Changes.begin(), Changes.end(),
- [](const AtomicChange &L, const AtomicChange &R) {
- return L.getFilePath() < R.getFilePath();
- });
+ llvm::sort(Changes, [](const AtomicChange &L, const AtomicChange &R) {
+ return L.getFilePath() < R.getFilePath();
+ });
ASSERT_EQ(Changes[0].getFilePath(), "./input.h");
EXPECT_THAT(Changes[0].getInsertedHeaders(), IsEmpty());
#include "Symbols.h"
#include "Writer.h"
#include "llvm/ADT/Twine.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/Debug.h"
size_t cnt = 0;
for (const ChunkAndOffset &co : syms)
begin[cnt++] = co.inputChunk->getRVA() + co.offset;
- std::sort(begin, begin + cnt);
+ llvm::sort(begin, begin + cnt);
assert(std::unique(begin, begin + cnt) == begin + cnt &&
"RVA tables should be de-duplicated");
}
#include "COFFLinkerContext.h"
#include "Chunks.h"
#include "SymbolTable.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Path.h"
for (auto &kv : m) {
// Sort symbols by name for each group.
std::vector<DefinedImportData *> &syms = kv.second;
- std::sort(syms.begin(), syms.end(),
- [](DefinedImportData *a, DefinedImportData *b) {
- return a->getName() < b->getName();
- });
+ llvm::sort(syms, [](DefinedImportData *a, DefinedImportData *b) {
+ return a->getName() < b->getName();
+ });
v.push_back(std::move(syms));
}
return v;
#include "lld/Common/ErrorHandler.h"
#include "lld/Common/Memory.h"
#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/Object/COFF.h"
config->exports = std::move(v);
// Sort by name.
- std::sort(config->exports.begin(), config->exports.end(),
- [](const Export &a, const Export &b) {
- return a.exportName < b.exportName;
- });
+ llvm::sort(config->exports, [](const Export &a, const Export &b) {
+ return a.exportName < b.exportName;
+ });
}
void assignExportOrdinals() {
#include "lld/Common/DWARF.h"
#include "lld/Common/Strings.h"
#include "lld/Common/Version.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/BinaryFormat/Dwarf.h"
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.
- std::sort(nonRelative, relocs.end(), [&](auto &a, auto &b) {
+ llvm::sort(nonRelative, relocs.end(), [&](auto &a, auto &b) {
return std::tie(a.r_sym, a.r_offset) < std::tie(b.r_sym, b.r_offset);
});
}
std::unique_ptr<uint64_t[]> offsets(new uint64_t[relocs.size()]);
for (auto it : llvm::enumerate(relocs))
offsets[it.index()] = it.value().getOffset();
- std::sort(offsets.get(), offsets.get() + relocs.size());
+ llvm::sort(offsets.get(), offsets.get() + relocs.size());
// For each leading relocation, find following ones that can be folded
// as a bitmap and fold them.
// - by function, then
// - by isa<MDString>
// and then sort by the original/current ID. Since the IDs are guaranteed to
- // be unique, the result of std::sort will be deterministic. There's no need
+ // be unique, the result of llvm::sort will be deterministic. There's no need
// for std::stable_sort.
llvm::sort(Order, [this](MDIndex LHS, MDIndex RHS) {
return std::make_tuple(LHS.F, getMetadataTypeOrder(LHS.get(MDs)), LHS.ID) <
for (auto &PHI : CreatedPHIs)
SortedPHIs.push_back(PHI);
- std::sort(
- SortedPHIs.begin(), SortedPHIs.end(), [&](LDVSSAPhi *A, LDVSSAPhi *B) {
- return BBToOrder[&A->getParent()->BB] < BBToOrder[&B->getParent()->BB];
- });
+ llvm::sort(SortedPHIs, [&](LDVSSAPhi *A, LDVSSAPhi *B) {
+ return BBToOrder[&A->getParent()->BB] < BBToOrder[&B->getParent()->BB];
+ });
for (auto &PHI : SortedPHIs) {
ValueIDNum ThisBlockValueNum =
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCPseudoProbe.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
std::vector<uint64_t> Addresses;
for (auto Entry : Address2ProbesMap)
Addresses.push_back(Entry.first);
- std::sort(Addresses.begin(), Addresses.end());
+ llvm::sort(Addresses);
for (auto K : Addresses) {
OS << "Address:\t";
OS << K;
#include "DXILBitcodeWriter.h"
#include "DXILValueEnumerator.h"
#include "PointerTypeAnalysis.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/BitcodeCommon.h"
#include "llvm/Bitcode/BitcodeReader.h"
SortedTable.push_back(VI.second->getValueName());
}
// The keys are unique, so there shouldn't be stability issues.
- std::sort(SortedTable.begin(), SortedTable.end(),
- [](const ValueName *A, const ValueName *B) {
- return A->first() < B->first();
- });
+ llvm::sort(SortedTable, [](const ValueName *A, const ValueName *B) {
+ return A->first() < B->first();
+ });
for (const ValueName *SI : SortedTable) {
auto &Name = *SI;
// - by function, then
// - by isa<MDString>
// and then sort by the original/current ID. Since the IDs are guaranteed to
- // be unique, the result of std::sort will be deterministic. There's no need
+ // be unique, the result of llvm::sort will be deterministic. There's no need
// for std::stable_sort.
llvm::sort(Order, [this](MDIndex LHS, MDIndex RHS) {
return std::make_tuple(LHS.F, getMetadataTypeOrder(LHS.get(MDs)), LHS.ID) <
#include "llvm/IR/Function.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetOptions.h"
-#include <algorithm> // std::sort
+#include <algorithm>
using namespace llvm;
//===----------------------------------------------------------------------===//
#include "llvm/ADT/SmallSet.h"
+#include "llvm/ADT/STLExtras.h"
#include "gtest/gtest.h"
#include <string>
std::vector<int> V(s1.begin(), s1.end());
// Make sure the elements are in the expected order.
- std::sort(V.begin(), V.end());
+ llvm::sort(V);
for (int i = 0; i < 3; i++)
EXPECT_EQ(i, V[i]);
V.assign(s1.begin(), s1.end());
// Make sure the elements are in the expected order.
- std::sort(V.begin(), V.end());
+ llvm::sort(V);
for (int i = 0; i < 6; i++)
EXPECT_EQ(i, V[i]);
}
s1.insert("str 1");
std::vector<std::string> V(s1.begin(), s1.end());
- std::sort(V.begin(), V.end());
+ llvm::sort(V);
EXPECT_EQ(2u, s1.size());
EXPECT_EQ("str 1", V[0]);
EXPECT_EQ("str 2", V[1]);
V.assign(s1.begin(), s1.end());
// Make sure the elements are in the expected order.
- std::sort(V.begin(), V.end());
+ llvm::sort(V);
EXPECT_EQ(4u, s1.size());
EXPECT_EQ("str 0", V[0]);
EXPECT_EQ("str 1", V[1]);
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MIRParser/MIRParser.h"
#include "llvm/CodeGen/MIRPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
for (auto &MD : MDList)
Collected.push_back(MD.second);
- std::sort(Generated.begin(), Generated.end());
- std::sort(Collected.begin(), Collected.end());
+ llvm::sort(Generated);
+ llvm::sort(Collected);
EXPECT_EQ(Collected, Generated);
// FileCheck the output from MIR printer.
for (auto &MD : MDList)
Collected.push_back(MD.second);
- std::sort(Generated.begin(), Generated.end());
- std::sort(Collected.begin(), Collected.end());
+ llvm::sort(Generated);
+ llvm::sort(Collected);
EXPECT_EQ(Collected, Generated);
// FileCheck the output from MIR printer.
for (auto &MD : MDList)
Collected.push_back(MD.second);
- std::sort(Generated.begin(), Generated.end());
- std::sort(Collected.begin(), Collected.end());
+ llvm::sort(Generated);
+ llvm::sort(Collected);
EXPECT_EQ(Collected, Generated);
// FileCheck the output from MIR printer.
//===----------------------------------------------------------------------===//
#include "llvm/Support/Alignment.h"
+#include "llvm/ADT/STLExtras.h"
#include "gtest/gtest.h"
#include <vector>
TEST(AlignmentTest, AlignComparisons) {
std::vector<uint64_t> ValidAlignments = getValidAlignments();
- std::sort(ValidAlignments.begin(), ValidAlignments.end());
+ llvm::sort(ValidAlignments);
for (size_t I = 1; I < ValidAlignments.size(); ++I) {
assert(I >= 1);
const Align A(ValidAlignments[I - 1]);
static void emitDXILEnums(std::vector<DXILOperationData> &DXILOps,
raw_ostream &OS) {
// Sort by Category + OpName.
- std::sort(DXILOps.begin(), DXILOps.end(),
- [](DXILOperationData &A, DXILOperationData &B) {
- // Group by Category first.
- if (A.Category == B.Category)
- // Inside same Category, order by OpName.
- return A.DXILOp < B.DXILOp;
- else
- return A.Category < B.Category;
- });
+ llvm::sort(DXILOps, [](DXILOperationData &A, DXILOperationData &B) {
+ // Group by Category first.
+ if (A.Category == B.Category)
+ // Inside same Category, order by OpName.
+ return A.DXILOp < B.DXILOp;
+ else
+ return A.Category < B.Category;
+ });
OS << "// Enumeration for operations specified by DXIL\n";
OS << "enum class OpCode : unsigned {\n";
std::make_pair(It.getKey().str(), buildCategoryStr(It.second)));
}
// Sort by Category + ClassName.
- std::sort(ClassVec.begin(), ClassVec.end(),
- [](std::pair<std::string, std::string> &A,
- std::pair<std::string, std::string> &B) {
- StringRef ClassA = A.first;
- StringRef CategoryA = A.second;
- StringRef ClassB = B.first;
- StringRef CategoryB = B.second;
- // Group by Category first.
- if (CategoryA == CategoryB)
- // Inside same Category, order by ClassName.
- return ClassA < ClassB;
- else
- return CategoryA < CategoryB;
- });
+ llvm::sort(ClassVec, [](std::pair<std::string, std::string> &A,
+ std::pair<std::string, std::string> &B) {
+ StringRef ClassA = A.first;
+ StringRef CategoryA = A.second;
+ StringRef ClassB = B.first;
+ StringRef CategoryB = B.second;
+ // Group by Category first.
+ if (CategoryA == CategoryB)
+ // Inside same Category, order by ClassName.
+ return ClassA < ClassB;
+ else
+ return CategoryA < CategoryB;
+ });
OS << "// Groups for DXIL operations with equivalent function templates\n";
OS << "enum class OpCodeClass : unsigned {\n";
static void emitDXILOperationTable(std::vector<DXILOperationData> &DXILOps,
raw_ostream &OS) {
// Sort by DXILOpID.
- std::sort(DXILOps.begin(), DXILOps.end(),
- [](DXILOperationData &A, DXILOperationData &B) {
- return A.DXILOpID < B.DXILOpID;
- });
+ llvm::sort(DXILOps, [](DXILOperationData &A, DXILOperationData &B) {
+ return A.DXILOpID < B.DXILOpID;
+ });
// Collect Names.
SequenceToOffsetTable<std::string> OpClassStrings;
std::vector<Record *> Clauses = DirLang.getClauses();
// Sort clauses in reverse alphabetical order so with clauses with same
// beginning, the longer option is tried before.
- std::sort(Clauses.begin(), Clauses.end(), compareClauseName);
+ llvm::sort(Clauses, compareClauseName);
IfDefScope Scope("GEN_FLANG_CLAUSES_PARSER", OS);
OS << "\n";
unsigned index = 0;
#include "CodeGenIntrinsics.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
SearchIndex Idx;
std::copy(Table.Fields.begin(), Table.Fields.end(),
std::back_inserter(Idx.Fields));
- std::sort(Table.Entries.begin(), Table.Entries.end(),
- [&](Record *LHS, Record *RHS) { return compareBy(LHS, RHS, Idx); });
+ llvm::sort(Table.Entries, [&](Record *LHS, Record *RHS) {
+ return compareBy(LHS, RHS, Idx);
+ });
}
void SearchableTableEmitter::run(raw_ostream &OS) {
std::pair<std::string, std::vector<uint8_t>> serialize() {
std::set<std::string> Names = this->getNameFragments();
std::vector<std::string> Sorted(Names.begin(), Names.end());
- std::sort(Sorted.begin(), Sorted.end(),
- [](const auto &a, const auto &b) { return a.size() > b.size(); });
+ llvm::sort(Sorted, [](const auto &a, const auto &b) {
+ return a.size() > b.size();
+ });
std::string Dict(Letters.begin(), Letters.end());
Dict.reserve(50000);
for (const std::string &Name : Sorted) {
#include "mlir/IR/Operation.h"
#include "mlir/IR/Region.h"
#include "mlir/IR/Value.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Support/raw_ostream.h"
auto printValueRefs = [&](const ValueSetT &values) {
std::vector<Value> orderedValues(values.begin(), values.end());
- std::sort(orderedValues.begin(), orderedValues.end(),
- [&](Value left, Value right) {
- return valueIds[left] < valueIds[right];
- });
+ llvm::sort(orderedValues, [&](Value left, Value right) {
+ return valueIds[left] < valueIds[right];
+ });
for (Value value : orderedValues)
printValueRef(value);
};
printValueRef(result);
os << ":";
auto liveOperations = resolveLiveness(result);
- std::sort(liveOperations.begin(), liveOperations.end(),
- [&](Operation *left, Operation *right) {
- return operationIds[left] < operationIds[right];
- });
+ llvm::sort(liveOperations, [&](Operation *left, Operation *right) {
+ return operationIds[left] < operationIds[right];
+ });
for (Operation *operation : liveOperations) {
os << "\n// ";
operation->print(os);
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
srcIdCandidates.push_back(srcNode->id);
}
- std::sort(srcIdCandidates.begin(), srcIdCandidates.end());
+ llvm::sort(srcIdCandidates);
srcIdCandidates.erase(
std::unique(srcIdCandidates.begin(), srcIdCandidates.end()),
srcIdCandidates.end());
// Presort combined dimensions.
auto sortedDimensions = llvm::to_vector<3>(combinedDimensions);
for (auto &dims : sortedDimensions)
- std::sort(dims.begin(), dims.end());
+ llvm::sort(dims);
// Normalize ParallelOp's iteration pattern.
SmallVector<Value, 3> normalizedLowerBounds, normalizedSteps,
// Constructing the simplified semi-affine sum of product/division/mod
// expression from the flattened form in the desired sorted order of indices
// of the various individual product/division/mod expressions.
- std::sort(indices.begin(), indices.end());
+ llvm::sort(indices);
for (const std::pair<unsigned, unsigned> index : indices) {
assert(indexToExprMap.lookup(index) &&
"cannot find key in `indexToExprMap` map");