[llvm] c7b499d - [DWARFLinker] Fix llvm::sort ambiguity
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 20:03:09 PDT 2020
Author: Jonas Devlieghere
Date: 2020-05-06T20:02:57-07:00
New Revision: c7b499d82cd657068661619126103936e4f49a79
URL: https://github.com/llvm/llvm-project/commit/c7b499d82cd657068661619126103936e4f49a79
DIFF: https://github.com/llvm/llvm-project/commit/c7b499d82cd657068661619126103936e4f49a79.diff
LOG: [DWARFLinker] Fix llvm::sort ambiguity
Fix DWARFLinker.cpp:2538:5: error: call to 'sort' is ambiguous.
Added:
Modified:
llvm/lib/DWARFLinker/DWARFLinker.cpp
Removed:
################################################################################
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<std::pair<StringRef, DebugInfoSize>> 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;
});
More information about the llvm-commits
mailing list