[PATCH] D120357: [llvm-nm][refactor] add helper function to print out the object file name, archive name, architecture name
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 09:13:38 PST 2022
DiggerLin marked 4 inline comments as done.
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:1864
+
+static void dumpSymbolNamesFromObject(SymbolicFile &Obj, bool PrintName,
+ bool PrintObjectNameInfo,
----------------
MaskRay wrote:
> Try `const SymbolicFile &Obj` and fix some non-const references in the body.
Agree with you , but if I change the to const SymbolicFile &Obj, a lot of functions's parameter need to "const SymbolicFile &Obj" ,
for example, printSymbolList() ,isSymbolList64Bit() , I am prefer to keep as it is now. and another separate patch for it. if you strong suggest that we need to change it the patch. I can do it.
================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:1865-1866
+
+static void dumpSymbolNamesFromObject(SymbolicFile &Obj, bool PrintName,
+ bool PrintObjectNameInfo,
+ StringRef ArchiveName = {},
----------------
jhenderson wrote:
> It's not clear what the difference is between `PrintName` and `PrintObjectNameInfo` from just the variable names. I suggest renaming `PrintName` to be more specific (I think it's `PrintSymbolName` right?). Also, I'd drop "Info" from the `PrintObjectNameInfo` variable name.
it is not printing symbol name. it print object file name relate info. I thin PrintName is too generic. I used PrintObjectName?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120357/new/
https://reviews.llvm.org/D120357
More information about the llvm-commits
mailing list