[PATCH] D134811: [lld-macho] Don't create entries in isecPriorities during sorting (NFC)

Daniel Bertalan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 07:55:56 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf546165754d4: [lld-macho] Don't create entries in isecPriorities during sorting (NFC) (authored by BertalanD).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134811/new/

https://reviews.llvm.org/D134811

Files:
  lld/MachO/Writer.cpp


Index: lld/MachO/Writer.cpp
===================================================================
--- lld/MachO/Writer.cpp
+++ lld/MachO/Writer.cpp
@@ -902,10 +902,10 @@
 
       if (!isecPriorities.empty()) {
         if (auto *merged = dyn_cast<ConcatOutputSection>(osec)) {
-          llvm::stable_sort(merged->inputs,
-                            [&](InputSection *a, InputSection *b) {
-                              return isecPriorities[a] > isecPriorities[b];
-                            });
+          llvm::stable_sort(
+              merged->inputs, [&](InputSection *a, InputSection *b) {
+                return isecPriorities.lookup(a) > isecPriorities.lookup(b);
+              });
         }
       }
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134811.463565.patch
Type: text/x-patch
Size: 723 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220928/6a3ea276/attachment.bin>


More information about the llvm-commits mailing list