[PATCH] D58779: [yaml2obj] - Allow setting custom sh_info for RawContentSection sections.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 06:59:27 PST 2019


jhenderson added inline comments.


================
Comment at: test/tools/yaml2obj/elf-symtab-shinfo.yaml:45
+
+## Check we dont crash when .symtab has type different from SHT_SYMTAB.
+# RUN: yaml2obj -docnum=2 %s -o /dev/null
----------------
grimar wrote:
> grimar wrote:
> > jhenderson wrote:
> > > This looks like it belongs in a different test, as it's not to do with the sh_info field.
> > It is for line 352 of yaml2elf.cpp:
> > 
> > This line: `if (auto S = dyn_cast<ELFYAML::RawContentSection>(Sec))` is needed,
> > without if this test would crash.
> > 
> So it's technically relative with how we set `sh_info`. Want me to move this out?
Yes, I think so. It can be in this patch, but should be a different test, as although it is relevant to the current implementation, you could imagine it being more generally useful.


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

https://reviews.llvm.org/D58779





More information about the llvm-commits mailing list