Index: include/llvm/Analysis/LoopInfoImpl.h =================================================================== --- include/llvm/Analysis/LoopInfoImpl.h +++ include/llvm/Analysis/LoopInfoImpl.h @@ -572,8 +572,8 @@ template bool compareVectors(std::vector &BB1, std::vector &BB2) { - std::sort(BB1.begin(), BB1.end()); - std::sort(BB2.begin(), BB2.end()); + llvm::sort(BB1.begin(), BB1.end()); + llvm::sort(BB2.begin(), BB2.end()); return BB1 == BB2; } Index: include/llvm/CodeGen/SlotIndexes.h =================================================================== --- include/llvm/CodeGen/SlotIndexes.h +++ include/llvm/CodeGen/SlotIndexes.h @@ -674,7 +674,7 @@ idx2MBBMap.push_back(IdxMBBPair(startIdx, mbb)); renumberIndexes(newItr); - std::sort(idx2MBBMap.begin(), idx2MBBMap.end(), Idx2MBBCompare()); + llvm::sort(idx2MBBMap.begin(), idx2MBBMap.end(), Idx2MBBCompare()); } /// \brief Free the resources that were required to maintain a SlotIndex. Index: include/llvm/ProfileData/InstrProf.h =================================================================== --- include/llvm/ProfileData/InstrProf.h +++ include/llvm/ProfileData/InstrProf.h @@ -544,9 +544,9 @@ void InstrProfSymtab::finalizeSymtab() { if (Sorted) return; - std::sort(MD5NameMap.begin(), MD5NameMap.end(), less_first()); - std::sort(MD5FuncMap.begin(), MD5FuncMap.end(), less_first()); - std::sort(AddrToMD5Map.begin(), AddrToMD5Map.end(), less_first()); + llvm::sort(MD5NameMap.begin(), MD5NameMap.end(), less_first()); + llvm::sort(MD5FuncMap.begin(), MD5FuncMap.end(), less_first()); + llvm::sort(AddrToMD5Map.begin(), AddrToMD5Map.end(), less_first()); AddrToMD5Map.erase(std::unique(AddrToMD5Map.begin(), AddrToMD5Map.end()), AddrToMD5Map.end()); Sorted = true; Index: include/llvm/Support/GenericDomTreeConstruction.h =================================================================== --- include/llvm/Support/GenericDomTreeConstruction.h +++ include/llvm/Support/GenericDomTreeConstruction.h @@ -1241,11 +1241,11 @@ Operations[{U.getTo(), U.getFrom()}] = int(i); } - std::sort(Result.begin(), Result.end(), - [&Operations](const UpdateT &A, const UpdateT &B) { - return Operations[{A.getFrom(), A.getTo()}] > - Operations[{B.getFrom(), B.getTo()}]; - }); + llvm::sort(Result.begin(), Result.end(), + [&Operations](const UpdateT &A, const UpdateT &B) { + return Operations[{A.getFrom(), A.getTo()}] > + Operations[{B.getFrom(), B.getTo()}]; + }); } static void ApplyNextUpdate(DomTreeT &DT, BatchUpdateInfo &BUI) { @@ -1430,10 +1430,10 @@ // Make a copy and sort it such that it is possible to check if there are // no gaps between DFS numbers of adjacent children. SmallVector Children(Node->begin(), Node->end()); - std::sort(Children.begin(), Children.end(), - [](const TreeNodePtr Ch1, const TreeNodePtr Ch2) { - return Ch1->getDFSNumIn() < Ch2->getDFSNumIn(); - }); + llvm::sort(Children.begin(), Children.end(), + [](const TreeNodePtr Ch1, const TreeNodePtr Ch2) { + return Ch1->getDFSNumIn() < Ch2->getDFSNumIn(); + }); auto PrintChildrenError = [Node, &Children, PrintNodeAndDFSNums]( const TreeNodePtr FirstCh, const TreeNodePtr SecondCh) { Index: include/llvm/Support/Parallel.h =================================================================== --- include/llvm/Support/Parallel.h +++ include/llvm/Support/Parallel.h @@ -118,7 +118,7 @@ const Comparator &Comp, TaskGroup &TG, size_t Depth) { // Do a sequential sort for small inputs. if (std::distance(Start, End) < detail::MinParallelSize || Depth == 0) { - std::sort(Start, End, Comp); + llvm::sort(Start, End, Comp); return; } @@ -200,7 +200,7 @@ const Comparator &Comp = Comparator()) { static_assert(is_execution_policy::value, "Invalid execution policy!"); - std::sort(Start, End, Comp); + llvm::sort(Start, End, Comp); } template Index: include/llvm/Support/ScopedPrinter.h =================================================================== --- include/llvm/Support/ScopedPrinter.h +++ include/llvm/Support/ScopedPrinter.h @@ -138,7 +138,7 @@ } } - std::sort(SetFlags.begin(), SetFlags.end(), &flagName); + llvm::sort(SetFlags.begin(), SetFlags.end(), &flagName); startLine() << Label << " [ (" << hex(Value) << ")\n"; for (const auto &Flag : SetFlags) {