Index: lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp =================================================================== --- lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp +++ lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp @@ -79,7 +79,7 @@ for (const auto &M : Mappings) Ids.push_back(&M); - std::sort(Ids.begin(), Ids.end(), [this](const T &L1, const T &L2) { + llvm::sort(Ids.begin(), Ids.end(), [this](const T &L1, const T &L2) { return Strings.getIdForString(L1->getKey()) < Strings.getIdForString(L2->getKey()); }); Index: lib/DebugInfo/DWARF/DWARFContext.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFContext.cpp +++ lib/DebugInfo/DWARF/DWARFContext.cpp @@ -108,12 +108,12 @@ // Sort the contributions so that any invalid ones are placed at // the start of the contributions vector. This way they are reported // first. - std::sort(Contributions.begin(), Contributions.end(), - [](const Optional &L, - const Optional &R) { - if (L && R) return L->Base < R->Base; - return R.hasValue(); - }); + llvm::sort(Contributions.begin(), Contributions.end(), + [](const Optional &L, + const Optional &R) { + if (L && R) return L->Base < R->Base; + return R.hasValue(); + }); // Uniquify contributions, as it is possible that units (specifically // type units in dwo or dwp files) share contributions. We don't want Index: lib/DebugInfo/DWARF/DWARFDebugAranges.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFDebugAranges.cpp +++ lib/DebugInfo/DWARF/DWARFDebugAranges.cpp @@ -80,7 +80,7 @@ void DWARFDebugAranges::construct() { std::multiset ValidCUs; // Maintain the set of CUs describing // a current address range. - std::sort(Endpoints.begin(), Endpoints.end()); + llvm::sort(Endpoints.begin(), Endpoints.end()); uint64_t PrevAddress = -1ULL; for (const auto &E : Endpoints) { if (PrevAddress < E.Address && !ValidCUs.empty()) { Index: lib/DebugInfo/DWARF/DWARFDebugLine.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -835,7 +835,7 @@ // Sort all sequences so that address lookup will work faster. if (!Sequences.empty()) { - std::sort(Sequences.begin(), Sequences.end(), Sequence::orderByLowPC); + llvm::sort(Sequences.begin(), Sequences.end(), Sequence::orderByLowPC); // Note: actually, instruction address ranges of sequences should not // overlap (in shared objects and executables). If they do, the address // lookup would still work, though, but result would be ambiguous.