This is a re-submission of https://reviews.llvm.org/D58263 or https://reviews.llvm.org/rL354833, for PR39998 and PR39999.
That checkin was reverted due to an Asan failure. This patch fixes that failure.
In the process of fixing the Asan failure, the overall patch has become much smaller, so I am submitting it as a separate review.
The major simplification vs D58263 is that the new virtual function introduced in in that has now been removed. The code in llvm-nm.cpp now relies on Symbol flags already computed earlier.
Other than that there are
- minor stylistic changes, and
- a test Object/X86/nm-print-size.s has been enhanced to test "-f sysv" output
Looks like the indentation got messed up here?