[PATCH] D66425: [llvm-readobj] Prepend argv[0] to error messages
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 04:29:45 PDT 2019
jhenderson added inline comments.
================
Comment at: test/tools/llvm-readobj/error-format.test:6-7
+
+# ERR-READELF: llvm-readelf{{(\.exe)?}}: error: '{{.*}}': {{[Nn]}}o such file or directory
+# ERR-READOBJ: llvm-readobj{{(\.exe)?}}: error: '{{.*}}': {{[Nn]}}o such file or directory
+
----------------
Have you considered folding these two together using FileCheck's -D option?
```
# RUN: ... | FileCheck --check-prefix=ERR %s -DTOOL=readelf
# RUN: ... | FileCheck --check-prefix=ERR %s -DTOOL=readobj
# ERR: llvm-[[TOOL]]{{(\.exe)?}}: ...
```
Same goes for the warning case.
================
Comment at: test/tools/llvm-readobj/error-format.test:9-12
+# RUN: llvm-readelf -x 10 %S/Inputs/trivial.obj.elf-x86-64 2>&1 | \
+# RUN: FileCheck --check-prefix=WARN-READELF %s
+# RUN: llvm-readobj -x 10 %S/Inputs/trivial.obj.elf-x86-64 2>&1 | \
+# RUN: FileCheck --check-prefix=WARN-READOBJ %s
----------------
I think we should probably just use yaml2obj here instead of relying on pre-built binaries. I don't feel strongly about it though.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66425/new/
https://reviews.llvm.org/D66425
More information about the llvm-commits
mailing list