[PATCH] D59946: [llvm-readobj] Improve error message for for --string-dump

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 10:03:33 PDT 2019


StephenTozer created this revision.
StephenTozer added a reviewer: jhenderson.
Herald added subscribers: llvm-commits, rupprecht, atanasyan, jrtc27, aheejin, sbc100.
Herald added a project: LLVM.

Fixes bug 40630: https://bugs.llvm.org/show_bug.cgi?id=40630

This patch changes the error message when the section specified by
--string-dump cannot be found by including the name of the section in
the error message and changing the prefix text to not imply that the
file itself was invalid. As part of this change some uses of
std::error_code have been replaced with the llvm Error class to better
encapsulate the error info (rather than passing File strings around),
and the WithColor class replaces string literal error prefixes.


Repository:
  rL LLVM

https://reviews.llvm.org/D59946

Files:
  llvm/test/tools/llvm-readobj/basic.test
  llvm/test/tools/llvm-readobj/codeview-merging-cycle.test
  llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
  llvm/test/tools/llvm-readobj/elf-malformed-pt-dynamic.test
  llvm/test/tools/llvm-readobj/elf-packed-relocs-error1.s
  llvm/test/tools/llvm-readobj/elf-packed-relocs-error2.s
  llvm/test/tools/llvm-readobj/elf-packed-relocs-error3.s
  llvm/test/tools/llvm-readobj/elf-packed-relocs-error4.s
  llvm/test/tools/llvm-readobj/elf-packed-relocs-error5.s
  llvm/test/tools/llvm-readobj/mips-got.test
  llvm/test/tools/llvm-readobj/string-dump.test
  llvm/test/tools/llvm-readobj/thin-archive-paths.test
  llvm/test/tools/llvm-readobj/thin-archive.test
  llvm/test/tools/llvm-readobj/wasm-invalid.test
  llvm/tools/llvm-readobj/ObjDumper.cpp
  llvm/tools/llvm-readobj/llvm-readobj.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59946.192666.patch
Type: text/x-patch
Size: 12617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190328/34cdb697/attachment.bin>


More information about the llvm-commits mailing list