[PATCH] D70112: [llvm-readobj] - Improve dumping of the SHT_LLVM_LINKER_OPTIONS sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 04:26:06 PST 2019
grimar added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/elf-linker-options.test:39
+# INCOMPLETE: LinkerOptions [
+# INCOMPLETE: warning: '[[FILE]]': SHT_LLVM_LINKER_OPTIONS is broken: an incomplete key-value pair was found, the last possible key was: "foo"
+# INCOMPLETE: ]
----------------
jhenderson wrote:
> Should we make these INCOMPLETE-NEXT to show that nothing is printed for the entry? In that case, what do you think about adding a valid pair before to show that earlier valid entries are (not) printed?
Yeah, I had to significantly change the structure here.
Using `returns` in the code was not correct I think,
then, if we want to continue dumping sections after reporting a warning, it is probably worth
to show how we dump the possible mixed cases too. So I've combined the valid/invalid cases and improved the error messages displayed.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:6023
+ if (Content.empty())
+ return;
----------------
MaskRay wrote:
> Should this be `continue`?
Right. I've changed all the logic here to continue dumping sections even after reporting an error.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:6029
+ FileName);
+ return;
+ }
----------------
compnerd wrote:
> This should probably be a `continue`.
Yes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70112/new/
https://reviews.llvm.org/D70112
More information about the llvm-commits
mailing list