[PATCH] D118193: [llvm-nm] add a new option -X to specify the type of object file llvm-nm should examine
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 31 11:41:31 PST 2022
DiggerLin marked 3 inline comments as done.
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:1787
+static bool doesNeedToDump(SymbolicFile &Obj) {
+ if ((isSymbolList64Bit(Obj) && BitMode == Bit32) ||
+ (!isSymbolList64Bit(Obj) && BitMode == Bit64))
----------------
MaskRay wrote:
> Avoid a negative function/variable name which holds a boolean that tells of whether we should not do something. Use the positive form: `shouldDump`
>
> ```
> if (BitMode == Any)
> return true;
> return isSymbolList64Bit(Obj) ? BitMode == Bit64 : BitMode == Bit32
> ```
>
thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118193/new/
https://reviews.llvm.org/D118193
More information about the llvm-commits
mailing list