[PATCH] D41527: [llvm-readobj] Support -needed-libs option for Mach-O files

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 13:09:45 PST 2017


phosek added inline comments.


================
Comment at: tools/llvm-readobj/MachODumper.cpp:701
+
+  std::stable_sort(Libs.begin(), Libs.end());
+
----------------
davide wrote:
> phosek wrote:
> > davide wrote:
> > > Why you need this stable sort?
> > I have followed the ELF implementation which also uses stable sort, I'm not sure why it's used there.
> I'd rather not cargo cult this here unless we have a good reason to. We shouldn't need this call, should we?
I think having a stable output order may be useful in some cases. Also if that's what we're already doing for ELF version, we should probably be consistent across all formats?


Repository:
  rL LLVM

https://reviews.llvm.org/D41527





More information about the llvm-commits mailing list