[PATCH] D120357: [llvm-nm]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
Mon Feb 28 08:13:59 PST 2022


DiggerLin marked 2 inline comments as done.
DiggerLin added a comment.

In D120357#3348530 <https://reviews.llvm.org/D120357#3348530>, @jhenderson wrote:

>> in the function dumpMachOUniversalBinaryArchAll , delete the functionality:
>
> Your commit message indicates that there's a functional change, but there's no corresponding test change. That implies there's either a missing test, or you've broken an existing test. I suggest adding a test to cover the output difference.

in the original code,

> if (moreThanOneArch)
>
> outs() << "\n";

if the MachOUniversalBinary has more than one object , it print as

"
(there is one empty line here)
a.o:

XXXXXX

b.o:

XXXXXX"

if only have one object file , it printed as

"a.o: //(there is no empty before the a.o)
XXXXXXX
"
it is not consistency for first object file a.o (whether there is a empty line before the first object file name(or Lable)"  for the MachOUniversalBinary , and other file format of the code
there do  test there is no empty line  for the first object file where is only one object file in the MachOUniversalBinary .

I change to always print out the

"
(there is one empty line here)
a.o:

XXXXXX
" 
even there is only object file in the MachOUniversalBinary.

I do not think we need test for a empty line of the first object file of the MachOUniversalBinary.


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