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

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 08:39:02 PDT 2019


sbc100 added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/basic.test:3-4
 RUN: not llvm-readobj %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s
-ENOENT: {{.*}}.blah: {{[Nn]}}o such file or directory
+ENOENT: '{{.*}}.blah': {{[Nn]}}o such file or directory
 
 # Test case where input file is too small to be a recognised object file.
----------------
StephenTozer wrote:
> grimar wrote:
> > It is strange to me to see the quotes wrapping the file name here.
> > I think tools usually do not do that?
> The FileError class automatically wraps the file name in quotes when it produces a message output, while the old std::error_code errors left it entirely up to the error handler. 
FWIW gnu objdump puts the filename in quotes in error messages too:

```
$ objdump -s /dev/null
objdump: Warning: '/dev/null' is not an ordinary file

```


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

https://reviews.llvm.org/D59946





More information about the llvm-commits mailing list