[PATCH] D89049: [AIX][XCOFF] print out the traceback info
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 10:56:51 PST 2022
DiggerLin marked 3 inline comments as done.
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1734-1735
+ Obj.isXCOFF() && Section.isText() && TracebackTable &&
+ Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass &&
+ (Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass.value() ==
+ XCOFF::XMC_PR);
----------------
jhenderson wrote:
> Perhaps worth pulling `Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass` into a helper variable, rather than repeating it.
the Symbols[SI - 1] has XCOFFSymInfo only when Obj.isXCOFF(), if I put Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass into a helper variable, it will the code complicate.
I maybe need to change the code as
```
bool DumpTracebackTableForXCOFFFunction = false;
if( Obj.isXCOFF() && Section.isText() && TracebackTable) {
Optional<XCOFF::StorageMappingClass> Smc = Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass;
if (Smc && value() ==XCOFF::XMC_PR)
DumpTracebackTableForXCOFFFunction = true;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89049/new/
https://reviews.llvm.org/D89049
More information about the llvm-commits
mailing list