[PATCH] D112183: [llvm-objdump] Fix the Assertion failure when providing invalid --debug-vars or --dwarf values
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 04:18:38 PDT 2021
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM, with nit.
================
Comment at: llvm/test/tools/llvm-objdump/ELF/ARM/debug-vars-dwarf4.s:48
# RUN: FileCheck %s --check-prefix=ASCII --strict-whitespace
+# RUN: not llvm-objdump - -d --debug-vars=bad_value 2>&1 | \
+# RUN: FileCheck %s --check-prefix=ERROR
----------------
gbreynoo wrote:
> jhenderson wrote:
> > I don't think this is going to do what you think it will.
> >
> > I //think// you're trying to feed the llvm-mc output into llvm-objdump (the `-` means read input from stdin), but you aren't piping any llvm-mc output into llvm-objdump.
> As the commandline parsing gave the error before the validity of the input was checked I didn't think we needed this line. To avoid confusion I have added the input.
We want to ensure that there are no other errors being emitted too, otherwise, we don't know that this error actually prevents continuation of the process, hence we need a valid input.
================
Comment at: llvm/test/tools/llvm-objdump/dwarf_invalid.yaml:1
+## Test invalid use of the --dwarf option
+
----------------
Nit: add missing trailing full stop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112183/new/
https://reviews.llvm.org/D112183
More information about the llvm-commits
mailing list