diff options
Diffstat (limited to 'clang/utils')
-rw-r--r-- | clang/utils/TableGen/ClangDiagnosticsEmitter.cpp | 16 | ||||
-rw-r--r-- | clang/utils/TableGen/ClangOptionDocEmitter.cpp | 6 | ||||
-rw-r--r-- | clang/utils/TableGen/NeonEmitter.cpp | 2 |
3 files changed, 11 insertions, 13 deletions
diff --git a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp index 6bfb3f9f61f..782b7130737 100644 --- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -208,9 +208,9 @@ static void groupDiagnostics(const std::vector<Record*> &Diags, E = SortedGroups.end(); I != E; ++I) { MutableArrayRef<const Record *> GroupDiags = (*I)->DiagsInGroup; - llvm::sort(GroupDiags.begin(), GroupDiags.end(), beforeThanCompare); + llvm::sort(GroupDiags, beforeThanCompare); } - llvm::sort(SortedGroups.begin(), SortedGroups.end(), beforeThanCompareGroups); + llvm::sort(SortedGroups, beforeThanCompareGroups); // Warn about the same group being used anonymously in multiple places. for (SmallVectorImpl<GroupInfo *>::const_iterator I = SortedGroups.begin(), @@ -1595,10 +1595,10 @@ void EmitClangDiagsIndexName(RecordKeeper &Records, raw_ostream &OS) { Index.push_back(RecordIndexElement(R)); } - llvm::sort(Index.begin(), Index.end(), + llvm::sort(Index, [](const RecordIndexElement &Lhs, const RecordIndexElement &Rhs) { return Lhs.Name < Rhs.Name; - }); + }); for (unsigned i = 0, e = Index.size(); i != e; ++i) { const RecordIndexElement &R = Index[i]; @@ -1694,7 +1694,7 @@ void EmitClangDiagDocs(RecordKeeper &Records, raw_ostream &OS) { std::vector<Record*> DiagGroups = Records.getAllDerivedDefinitions("DiagGroup"); - llvm::sort(DiagGroups.begin(), DiagGroups.end(), diagGroupBeforeByName); + llvm::sort(DiagGroups, diagGroupBeforeByName); DiagGroupParentMap DGParentMap(Records); @@ -1713,10 +1713,8 @@ void EmitClangDiagDocs(RecordKeeper &Records, raw_ostream &OS) { DiagsInPedanticSet.end()); RecordVec GroupsInPedantic(GroupsInPedanticSet.begin(), GroupsInPedanticSet.end()); - llvm::sort(DiagsInPedantic.begin(), DiagsInPedantic.end(), - beforeThanCompare); - llvm::sort(GroupsInPedantic.begin(), GroupsInPedantic.end(), - beforeThanCompare); + llvm::sort(DiagsInPedantic, beforeThanCompare); + llvm::sort(GroupsInPedantic, beforeThanCompare); PedDiags.DiagsInGroup.insert(PedDiags.DiagsInGroup.end(), DiagsInPedantic.begin(), DiagsInPedantic.end()); diff --git a/clang/utils/TableGen/ClangOptionDocEmitter.cpp b/clang/utils/TableGen/ClangOptionDocEmitter.cpp index 7fe487e5469..cf642ec92bd 100644 --- a/clang/utils/TableGen/ClangOptionDocEmitter.cpp +++ b/clang/utils/TableGen/ClangOptionDocEmitter.cpp @@ -111,7 +111,7 @@ Documentation extractDocumentation(RecordKeeper &Records) { auto DocumentationForOption = [&](Record *R) -> DocumentedOption { auto &A = Aliases[R]; - llvm::sort(A.begin(), A.end(), CompareByName); + llvm::sort(A, CompareByName); return {R, std::move(A)}; }; @@ -120,7 +120,7 @@ Documentation extractDocumentation(RecordKeeper &Records) { Documentation D; auto &Groups = GroupsInGroup[R]; - llvm::sort(Groups.begin(), Groups.end(), CompareByLocation); + llvm::sort(Groups, CompareByLocation); for (Record *G : Groups) { D.Groups.emplace_back(); D.Groups.back().Group = G; @@ -129,7 +129,7 @@ Documentation extractDocumentation(RecordKeeper &Records) { } auto &Options = OptionsInGroup[R]; - llvm::sort(Options.begin(), Options.end(), CompareByName); + llvm::sort(Options, CompareByName); for (Record *O : Options) D.Options.push_back(DocumentationForOption(O)); diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp index df14391b343..df002eef120 100644 --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/utils/TableGen/NeonEmitter.cpp @@ -2020,7 +2020,7 @@ void NeonEmitter::createIntrinsic(Record *R, } } - llvm::sort(NewTypeSpecs.begin(), NewTypeSpecs.end()); + llvm::sort(NewTypeSpecs); NewTypeSpecs.erase(std::unique(NewTypeSpecs.begin(), NewTypeSpecs.end()), NewTypeSpecs.end()); auto &Entry = IntrinsicMap[Name]; |