[PATCH] D116787: [llvm-readobj][MachO] Add option to sort the symbol table before dumping (MachO only, for now).

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 07:45:44 PST 2022


jhenderson added a comment.

In D116787#3287486 <https://reviews.llvm.org/D116787#3287486>, @oontvoo wrote:

> Regarding (1): it's not entirely true that this only sorts by type.(as mentioned, it sorts by both type and name).  The end goal here (for me) is to have a way to deterministically sort all the symbols.  The reason I didn't go with sorting them simply by name was because maskray@ raised concerns earlier that it didn't make sense semantically (with which I agreed).
>
> Regarding (2), how would multiple sorting types interact? eg., people specifying both `--sort-symbols=name --sort-symbols=type`. Does the order of the flag determine which one is the first sorting priority?

Ah I missed that it sorted by name and type.

Regarding 2, I think flag order determining sort priority would be wonderful, although I'd say `--sort-symbols=name,type` does it like that. Maybe `--sort-symbols=name --sort-symbols=type` does too, or maybe it sorts by just one. I'm not sure honestly.

Thoughts @MaskRay?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116787



More information about the llvm-commits mailing list