[PATCH] D82549: [AIX][XCOFF] parsing xcoff object file auxiliary header
Esme Yi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 18 00:48:20 PDT 2021
Esme added inline comments.
================
Comment at: llvm/tools/llvm-readobj/Opts.td:87
+// XCOFF specific options.
+def auxiliary_header : FF<"auxiliary-header" , "display the auxiliary header">;
+
----------------
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:54
+ void printAuxiliaryHeader(const XCOFFAuxiliaryHeader32 *AuxHeader);
+ void printAuxiliaryHeader(const XCOFFAuxiliaryHeader64 *AuxHeader);
const XCOFFObjectFile &Obj;
----------------
I noticed that the the two functions are very similar, can we make these common to avoid code duplication? As far as I know, almost all members are the same for 32-bit and 64-bit except for `"Additional flags 64-bit XCOFF", XCOFF64Flag`.
I.e. use `template <typename AuxT> void printAuxiliaryHeader(AuxT *AuxHeader);` to replace them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82549/new/
https://reviews.llvm.org/D82549
More information about the llvm-commits
mailing list