Index: llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp =================================================================== --- llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp +++ llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -83,7 +83,7 @@ return Counter::getZero(); // Group the terms by counter ID. - std::sort(Terms.begin(), Terms.end(), [](const Term &LHS, const Term &RHS) { + llvm::sort(Terms.begin(), Terms.end(), [](const Term &LHS, const Term &RHS) { return LHS.CounterID < RHS.CounterID; }); @@ -457,8 +457,8 @@ /// Sort a nested sequence of regions from a single file. static void sortNestedRegions(MutableArrayRef Regions) { - std::sort(Regions.begin(), Regions.end(), [](const CountedRegion &LHS, - const CountedRegion &RHS) { + llvm::sort(Regions.begin(), Regions.end(), [](const CountedRegion &LHS, + const CountedRegion &RHS) { if (LHS.startLoc() != RHS.startLoc()) return LHS.startLoc() < RHS.startLoc(); if (LHS.endLoc() != RHS.endLoc()) @@ -555,7 +555,7 @@ for (const auto &Function : getCoveredFunctions()) Filenames.insert(Filenames.end(), Function.Filenames.begin(), Function.Filenames.end()); - std::sort(Filenames.begin(), Filenames.end()); + llvm::sort(Filenames.begin(), Filenames.end()); auto Last = std::unique(Filenames.begin(), Filenames.end()); Filenames.erase(Last, Filenames.end()); return Filenames; Index: llvm/trunk/lib/ProfileData/GCOV.cpp =================================================================== --- llvm/trunk/lib/ProfileData/GCOV.cpp +++ llvm/trunk/lib/ProfileData/GCOV.cpp @@ -592,7 +592,7 @@ SmallVector Filenames; for (const auto &LI : LineInfo) Filenames.push_back(LI.first()); - std::sort(Filenames.begin(), Filenames.end()); + llvm::sort(Filenames.begin(), Filenames.end()); for (StringRef Filename : Filenames) { auto AllLines = LineConsumer(Filename); Index: llvm/trunk/lib/ProfileData/ProfileSummaryBuilder.cpp =================================================================== --- llvm/trunk/lib/ProfileData/ProfileSummaryBuilder.cpp +++ llvm/trunk/lib/ProfileData/ProfileSummaryBuilder.cpp @@ -58,7 +58,7 @@ void ProfileSummaryBuilder::computeDetailedSummary() { if (DetailedSummaryCutoffs.empty()) return; - std::sort(DetailedSummaryCutoffs.begin(), DetailedSummaryCutoffs.end()); + llvm::sort(DetailedSummaryCutoffs.begin(), DetailedSummaryCutoffs.end()); auto Iter = CountFrequencies.begin(); const auto End = CountFrequencies.end();