Summary:
Currently, we report:
error: ...
Prepend argv[0] (tool name):
llvm-readobj: error: ...
This is consistent with most GNU binutils/clang/lld, and gives a bit
more context in a long build log.
Reviewed By: grimar, jhenderson, rupprecht
Differential Revision: https://reviews.llvm.org/D66425
llvm-svn: 369377
20 lines
730 B
Plaintext
20 lines
730 B
Plaintext
## This test shows that we include the tool name in error/warning messages.
|
|
|
|
# RUN: not llvm-readelf %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=readelf
|
|
# RUN: not llvm-readobj %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=readobj
|
|
|
|
# ERR: llvm-[[TOOL]]{{(\.exe)?}}: error: '{{.*}}': {{[Nn]}}o such file or directory
|
|
|
|
# RUN: yaml2obj %s -o %t
|
|
# RUN: llvm-readelf -x 10 %t 2>&1 | FileCheck --check-prefix=WARN %s -DTOOL=readelf
|
|
# RUN: llvm-readobj -x 10 %t 2>&1 | FileCheck --check-prefix=WARN %s -DTOOL=readobj
|
|
|
|
# WARN: llvm-[[TOOL]]{{(\.exe)?}}: warning: '{{.*}}': could not find section 10
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_DYN
|
|
Machine: EM_RISCV
|