[PATCH] D66414: [llvm-objdump] Delete argv[0] from error messages

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 06:26:37 PDT 2019


jhenderson added a comment.

I don't feel strongly about this, but it would be a departure from what GNU tools and clang and LLD, and even MSVC do, so we probably shouldn't do this. The exact behaviour appears to be somewhat inconsistent, but in most cases, GNU tools do:

<argv[0]>: <error message>

Clang and LLD do:

<tool name>: error: <error message>

I'd therefore suggest that perhaps the correct thing to do is change llvm-objcopy and llvm-readobj.

I guess one advantage with the tool name being printed is that it gives a bit more context in a big long build log, if there are multiple problems, it's possible to tell which error/warning comes from which tool, especially as buffering and multi-threaded builds might result in the error message being rather far from related output.

MSVC appears to do:

<tool name> : <error/warning type> <error code> : <error message>


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66414/new/

https://reviews.llvm.org/D66414





More information about the llvm-commits mailing list