[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:02:06 PST 2017


phosek added inline comments.


================
Comment at: tools/llvm-readobj/MachODumper.cpp:42-43
 
+  void printNeededLibraries() override;
+
   // MachO-specific.
----------------
davide wrote:
> this is `Mach-O specific` no? So it should be grouped with the others.
This should be implemented for all formats, see https://github.com/llvm-mirror/llvm/blob/master/tools/llvm-readobj/ObjDumper.h#L42. It's currently implemented for ELF, I'm trying to add an implementation for Mach-O (D41527) and COFF (D41529).


================
Comment at: tools/llvm-readobj/MachODumper.cpp:701
+
+  std::stable_sort(Libs.begin(), Libs.end());
+
----------------
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.


Repository:
  rL LLVM

https://reviews.llvm.org/D41527





More information about the llvm-commits mailing list