[PATCH] D94667: [llvm-nm] - Move MachO specific logic out from the dumpSymbolNamesFromObject(). NFC.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 04:28:41 PST 2021


grimar added inline comments.


================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:1689
+
 static void dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
                                       StringRef ArchiveName = {},
----------------
grimar wrote:
> jhenderson wrote:
> > Is everything in this function essentially identical to what was there before (barring the new call)? For some reason, Phabricator isn't showing the "moved" marker, so I can't tell.
> Yes. 
> 
> Previously we had
> 
> ```
> if (MachO && !NoDyldInfo) {
>   <logic>
> }
> ```
> 
> and now we have:
> 
> 
> ```
> if (MachO && !NoDyldInfo)
>   dumpSymbolsFromDLInfoMachO(*MachO);
> ```
> 
> It is the only difference.
Oh, and

```
  std::string ExportsNameBuffer;
  raw_string_ostream EOS(ExportsNameBuffer);
  std::string BindsNameBuffer;
  raw_string_ostream BOS(BindsNameBuffer);
  std::string LazysNameBuffer;
  raw_string_ostream LOS(LazysNameBuffer);
  std::string WeaksNameBuffer;
  raw_string_ostream WOS(WeaksNameBuffer);
  std::string FunctionStartsNameBuffer;
  raw_string_ostream FOS(FunctionStartsNameBuffer);
```

declarations were also moved to `dumpSymbolsFromDLInfoMachO` of course,


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94667/new/

https://reviews.llvm.org/D94667



More information about the llvm-commits mailing list