[PATCH] D37347: [llvm-nm] Fix output formatting of -f sysv for 64bit targets

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 11:48:56 PDT 2017


ruiu added inline comments.


================
Comment at: test/tools/llvm-nm/X86/sysv-x86_64.test:1-2
+RUN: llvm-nm -f sysv %p/Inputs/hello.obj.elf-x86_64 | FileCheck %s --check-prefix="ELF" --strict-whitespace
+RUN: llvm-nm -f sysv %p/Inputs/hello.obj.macho-x86_64 2>&1 | FileCheck %s --check-prefix="MACHO" --strict-whitespace
+
----------------
nit: remove quotes from "ELF" and "MACHO"


================
Comment at: tools/llvm-nm/llvm-nm.cpp:712-713
     } else if (OutputFormat == sysv) {
       outs() << "\n\nSymbols from " << CurrentFilename << ":\n\n"
-             << "Name                  Value   Class        Type"
-             << "         Size   Line  Section\n";
+             << "Name                  Value   ";
+      if (isSymbolList64Bit(Obj))
----------------
Perhaps this is easier to read?

  if (isSymbolList64Bit(Obj))
    outs() << "Name                  Value           Class        Type"
           << "         Size           Line  Section\n";
  else
    outs() << "Name                  Value   Class        Type"
           << "         Size   Line  Section\n";



https://reviews.llvm.org/D37347





More information about the llvm-commits mailing list