[PATCH] D71118: [llvm-readelf/llvm-readobj] - Improved the error reporting in a few method related to versioning.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 07:24:48 PST 2019


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: seiya, rupprecht.
Herald added a project: LLVM.

I was investigating a change previously discussed that eliminates an excessive
empty lines from the output when we report warnings and errors
(https://reviews.llvm.org/D70826#inline-639055) and found
that we need this refactoring or alike to achieve that.

The problem is that some of our functions that finds symbol versions just
fail instead of returning errors or printing warnings. Another problem
is that they might print a warning on the same line with the regular output.
In this patch I've splitted getting of the version information and dumping of it
for GNU printVersionSymbolSection(). I had to change a few methods to return
Error or Expected<> to do that properly.


https://reviews.llvm.org/D71118

Files:
  llvm/test/Object/invalid.test
  llvm/test/tools/llvm-readobj/elf-verdef-invalid.test
  llvm/test/tools/llvm-readobj/elf-verneed-invalid.test
  llvm/test/tools/llvm-readobj/elf-versym-invalid.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71118.232558.patch
Type: text/x-patch
Size: 14915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191206/7709abd4/attachment.bin>


More information about the llvm-commits mailing list