This is an archive of the discontinued LLVM Phabricator instance.

[llvm-nm] Fix output formatting of -f sysv for 64bit targets
ClosedPublic

Authored by sbc100 on Aug 31 2017, 11:34 AM.

Details

Summary

The column heading were being printing assuming size and value
were 8-wide strings, but they are 16-wide on 64-bit systems.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Aug 31 2017, 11:34 AM
sbc100 edited the summary of this revision. (Show Details)Aug 31 2017, 11:35 AM
sbc100 added a subscriber: llvm-commits.
ruiu added inline comments.Aug 31 2017, 11:46 AM
test/tools/llvm-nm/X86/sysv-x86_64.test
1–2 ↗(On Diff #113446)

nit: remove quotes from "ELF" and "MACHO"

tools/llvm-nm/llvm-nm.cpp
712–713 ↗(On Diff #113446)

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";
sbc100 updated this revision to Diff 113455.Aug 31 2017, 12:40 PM
sbc100 edited the summary of this revision. (Show Details)
  • fixes from code review
sbc100 marked 2 inline comments as done.Aug 31 2017, 12:40 PM
ruiu accepted this revision.Aug 31 2017, 12:41 PM

LGTM

This revision is now accepted and ready to land.Aug 31 2017, 12:41 PM
This revision was automatically updated to reflect the committed changes.