[lld] [lld] Use llvm::less_first (NFC) (PR #136397)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 19:36:37 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/136397

None

>From 2cdfe02ce867c92764a510c4edaace52d7cd9d74 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 18 Apr 2025 10:09:57 -0700
Subject: [PATCH] [lld] Use llvm::less_first (NFC)

---
 lld/MachO/MapFile.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lld/MachO/MapFile.cpp b/lld/MachO/MapFile.cpp
index 8919c8d2f9b9c..f3e221a700b14 100644
--- a/lld/MachO/MapFile.cpp
+++ b/lld/MachO/MapFile.cpp
@@ -116,9 +116,7 @@ static MapInfo gatherMapInfo() {
   // cstrings are not stored in sorted order in their OutputSections, so we sort
   // them here.
   for (auto &liveCStrings : info.liveCStringsForSection)
-    parallelSort(liveCStrings.second, [](const auto &p1, const auto &p2) {
-      return p1.first < p2.first;
-    });
+    parallelSort(liveCStrings.second, llvm::less_first());
   return info;
 }
 



More information about the llvm-commits mailing list