[PATCH] D82549: [AIX][XCOFF] parsing xcoff object file auxiliary header
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 06:48:45 PDT 2020
DiggerLin marked 6 inline comments as done and an inline comment as not done.
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:489
+#define PrintAuxMember32(H, S, T) \
+ if (offsetof(XCOFFAuxiliaryHeader32, T) + sizeof(AuxHeader->T) <= AuxiSize) \
+ W.print##H(S, AuxHeader->T)
----------------
hubert.reinterpretcast wrote:
> You can use `XCOFFAuxiliaryHeader32::T` in the `sizeof`.
thanks
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:499
+ DictScope DS(W, "AuxiliaryHeader");
+ PrintAuxMember32(Hex, "Magic", AuxMagic);
+ PrintAuxMember32(Hex, "Version", Version);
----------------
hubert.reinterpretcast wrote:
> Since the macro refers to it, move the macro definition into the scope of `AuxiSize`.
thanks
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:527
+ PrintAuxMember32(Number, "Section number for .tdata", SecNumOfTData);
+ PrintAuxMember32(Number, "Section number for .tbss", SecNumOfTBSS);
+}
----------------
hubert.reinterpretcast wrote:
> For symmetry, move the `undef` into the function body.
thanks
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