[PATCH] D155045: [llvm-objdump] Create ObjectFile specific dumpers

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 09:30:38 PDT 2023


MaskRay added a comment.

In D155045#4532319 <https://reviews.llvm.org/D155045#4532319>, @jhenderson wrote:

> This is definitely a big step in the right direction for llvm-objdump, in my opinion, and I look forward to further work in this area. My one concern with this patch is the Mach-O-specific parameter being passed into `printPrivateHeaders`, as that feels a bit ugly to me. I wonder if we could create the Mach-O dumper somehow with that parameter set in some manner? It would then no longer be a parameter of `printPrivateHeaders` that impacts all tools. Alternatively, there could be some other mechanism to give the dumper subclasses access to various configuration parameters.

Thank you for the comment! `D.printPrivateHeaders(FirstPrivateHeader);` is indeed hackish to get things done. I'll check how it can be improved.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155045



More information about the llvm-commits mailing list