[ELF][MIPS] Fix predicate used for sorting MIPS dynamic symbol tables
Now it conforms requirement for std::stable_sort predicates. That
resolves build-bot failures on Windows hosts.
llvm-svn: 273151
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 040657a6..4b71874 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -1277,8 +1277,10 @@
const std::pair<SymbolBody *, unsigned> &R) {
// Sort entries related to non-local preemptible symbols by GOT indexes.
// All other entries go to the first part of GOT in arbitrary order.
- if (!L.first->IsInGlobalMipsGot || !R.first->IsInGlobalMipsGot)
- return !L.first->IsInGlobalMipsGot;
+ bool LIsInLocalGot = !L.first->IsInGlobalMipsGot;
+ bool RIsInLocalGot = !R.first->IsInGlobalMipsGot;
+ if (LIsInLocalGot || RIsInLocalGot)
+ return !RIsInLocalGot;
return L.first->GotIndex < R.first->GotIndex;
}