[PATCH] D157958: [TextAPI] Make sortTargetValues strict weak ordering compliant
Cyndy Ishida via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 08:57:30 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1094e2ebbae6: [TextAPI] Make sortTargetValues strict weak ordering compliant (authored by danlark, committed by cishida).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157958/new/
https://reviews.llvm.org/D157958
Files:
llvm/tools/llvm-readtapi/DiffEngine.cpp
Index: llvm/tools/llvm-readtapi/DiffEngine.cpp
===================================================================
--- llvm/tools/llvm-readtapi/DiffEngine.cpp
+++ llvm/tools/llvm-readtapi/DiffEngine.cpp
@@ -447,11 +447,11 @@
template <typename T> void sortTargetValues(std::vector<T> &TargValues) {
llvm::stable_sort(TargValues, [](const auto &ValA, const auto &ValB) {
+ if (ValA.getOrder() == ValB.getOrder()) {
+ return ValA.getVal() < ValB.getVal();
+ }
return ValA.getOrder() < ValB.getOrder();
});
- llvm::stable_sort(TargValues, [](const auto &ValA, const auto &ValB) {
- return ValA.getOrder() == ValB.getOrder() && ValA.getVal() < ValB.getVal();
- });
}
template <typename T>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157958.552040.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230821/231cdf68/attachment.bin>
More information about the llvm-commits
mailing list