diff options
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/JSON.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Timer.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/JSON.cpp b/llvm/lib/Support/JSON.cpp index a5dae7a7c2e..d468013fb94 100644 --- a/llvm/lib/Support/JSON.cpp +++ b/llvm/lib/Support/JSON.cpp @@ -517,7 +517,7 @@ static std::vector<const Object::value_type *> sortedElements(const Object &O) { std::vector<const Object::value_type *> Elements; for (const auto &E : O) Elements.push_back(&E); - llvm::sort(Elements.begin(), Elements.end(), + llvm::sort(Elements, [](const Object::value_type *L, const Object::value_type *R) { return L->first < R->first; }); diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index e17e5ab0141..582e2cf6c11 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -269,7 +269,7 @@ SMDiagnostic::SMDiagnostic(const SourceMgr &sm, SMLoc L, StringRef FN, : SM(&sm), Loc(L), Filename(FN), LineNo(Line), ColumnNo(Col), Kind(Kind), Message(Msg), LineContents(LineStr), Ranges(Ranges.vec()), FixIts(Hints.begin(), Hints.end()) { - llvm::sort(FixIts.begin(), FixIts.end()); + llvm::sort(FixIts); } static void buildFixItLine(std::string &CaretLine, std::string &FixItLine, diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index 3821f487a8f..82f5810dd10 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/lib/Support/Timer.cpp @@ -295,7 +295,7 @@ void TimerGroup::addTimer(Timer &T) { void TimerGroup::PrintQueuedTimers(raw_ostream &OS) { // Sort the timers in descending order by amount of time taken. - llvm::sort(TimersToPrint.begin(), TimersToPrint.end()); + llvm::sort(TimersToPrint); TimeRecord Total; for (const PrintRecord &Record : TimersToPrint) |