diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp index b85126e9063a..4e384d51103f 100644 --- a/llvm/lib/DWARFLinker/DWARFLinker.cpp +++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp @@ -9,6 +9,7 @@ #include "llvm/DWARFLinker/DWARFLinker.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Triple.h" #include "llvm/CodeGen/NonRelocatableStringpool.h" #include "llvm/DWARFLinker/DWARFLinkerDeclContext.h" @@ -2535,7 +2536,7 @@ bool DWARFLinker::link() { std::vector> Sorted; for (auto &E : SizeByObject) Sorted.emplace_back(E.first(), E.second); - sort(Sorted.begin(), Sorted.end(), [](auto &LHS, auto &RHS) { + llvm::sort(Sorted.begin(), Sorted.end(), [](auto &LHS, auto &RHS) { return LHS.second.Output > RHS.second.Output; });