Index: llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp +++ llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp @@ -85,7 +85,7 @@ if (empty()) return; - std::sort(begin(), end()); + llvm::sort(begin(), end()); iterator Iter = begin(); while (Iter != end()-1) { Index: llvm/trunk/lib/Target/Hexagon/HexagonConstExtenders.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/HexagonConstExtenders.cpp +++ llvm/trunk/lib/Target/Hexagon/HexagonConstExtenders.cpp @@ -1881,7 +1881,7 @@ AssignmentMap IMap; collect(MF); - std::sort(Extenders.begin(), Extenders.end(), + llvm::sort(Extenders.begin(), Extenders.end(), [](const ExtDesc &A, const ExtDesc &B) { return ExtValue(A) < ExtValue(B); }); Index: llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp +++ llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp @@ -632,7 +632,7 @@ SortableVectorType VRs; for (RegisterOrdering::iterator I = RB.begin(), E = RB.end(); I != E; ++I) VRs.push_back(I->first); - std::sort(VRs.begin(), VRs.end(), LexCmp); + llvm::sort(VRs.begin(), VRs.end(), LexCmp); // Transfer the results to the outgoing register ordering. for (unsigned i = 0, n = VRs.size(); i < n; ++i) RO.insert(std::make_pair(VRs[i], i)); Index: llvm/trunk/lib/Target/Hexagon/HexagonStoreWidening.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/HexagonStoreWidening.cpp +++ llvm/trunk/lib/Target/Hexagon/HexagonStoreWidening.cpp @@ -578,7 +578,7 @@ }; for (auto &G : SGs) { assert(G.size() > 1 && "Store group with fewer than 2 elements"); - std::sort(G.begin(), G.end(), Less); + llvm::sort(G.begin(), G.end(), Less); Changed |= processStoreGroup(G); } Index: llvm/trunk/lib/Target/Hexagon/RDFDeadCode.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/RDFDeadCode.cpp +++ llvm/trunk/lib/Target/Hexagon/RDFDeadCode.cpp @@ -214,7 +214,7 @@ return false; return A.Id < B.Id; }; - std::sort(DRNs.begin(), DRNs.end(), UsesFirst); + llvm::sort(DRNs.begin(), DRNs.end(), UsesFirst); if (trace()) dbgs() << "Removing dead ref nodes:\n"; Index: llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp +++ llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp @@ -1471,7 +1471,7 @@ // and add a def for each S in the closure. // Sort the refs so that the phis will be created in a deterministic order. - std::sort(MaxRefs.begin(), MaxRefs.end()); + llvm::sort(MaxRefs.begin(), MaxRefs.end()); // Remove duplicates. auto NewEnd = std::unique(MaxRefs.begin(), MaxRefs.end()); MaxRefs.erase(NewEnd, MaxRefs.end()); Index: llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp =================================================================== --- llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp +++ llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp @@ -207,7 +207,7 @@ }; std::vector Tmp(Owners.begin(), Owners.end()); - std::sort(Tmp.begin(), Tmp.end(), Less); + llvm::sort(Tmp.begin(), Tmp.end(), Less); // The vector is a list of instructions, so that defs coming from // the same instruction don't need to be artificially ordered. @@ -813,7 +813,7 @@ std::vector LV; for (auto I = B.livein_begin(), E = B.livein_end(); I != E; ++I) LV.push_back(RegisterRef(I->PhysReg, I->LaneMask)); - std::sort(LV.begin(), LV.end()); + llvm::sort(LV.begin(), LV.end()); dbgs() << printMBBReference(B) << "\t rec = {"; for (auto I : LV) dbgs() << ' ' << Print(I, DFG); @@ -824,7 +824,7 @@ const RegisterAggr &LG = LiveMap[&B]; for (auto I = LG.rr_begin(), E = LG.rr_end(); I != E; ++I) LV.push_back(*I); - std::sort(LV.begin(), LV.end()); + llvm::sort(LV.begin(), LV.end()); dbgs() << "\tcomp = {"; for (auto I : LV) dbgs() << ' ' << Print(I, DFG);