[PATCH] D84651: [llvm-readobj] - Don't call `unwrapOrErr` in `findSectionByName`.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 01:22:32 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/mips-abiflags.test:384-386
+# NAME-ERR-FOUND-NEXT:      warning: '[[FILE]]': unable to locate the .MIPS.options section: there is no such section, or its name can't be read
+# NAME-ERR-FOUND-NEXT:      warning: '[[FILE]]': unable to locate the .reginfo section: there is no such section, or its name can't be read
+# NAME-ERR-FOUND-NEXT:      error: '[[FILE]]': unable to locate the .got section: there is no such section, or its name can't be read
----------------
I think these additional "section not found" errors/warnings are confusing the issue of what's important in the test. I'd add the respective missing sections, so that the errors aren't emitted.

Alternatively, I'm not 100% convinced we should have this kind of warning/error at all, since the earlier warning(s) might be sufficient to say there are problems reading the section names. I might be incined to just fallback to the "not found" behaviour in that case, though like I say, I could be persuaded otherwise.

Same goes for all the other test cases.


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

https://reviews.llvm.org/D84651



More information about the llvm-commits mailing list