[PATCH] D69670: [NFC][llvm-readobj] Split getSectionIndexName function into two

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 10:01:14 PDT 2019


jhenderson created this revision.
jhenderson added reviewers: grimar, MaskRay, rupprecht.
Herald added subscribers: seiya, s.egerton, arphaman, simoncook, fedor.sergeev, dschuff, srhines.
Herald added a project: LLVM.
jhenderson added a child revision: D69671: [llvm-readobj] Change errors to warnings for symbol section name dumping.

getSectionIndexName was trying to fetch two things at once, which led to a somewhat tricky to understand interface involving passing output parameters in, and also made it hard to return Errors further up the stack.

This change is in preparation for changing the error handling.

Additionally, update a related test now that yaml2obj supports SHT_SYMTAB_SHNDX properly, and add missing LLVM-style coverage for symbols with shndx SHN_XINDEX. This test (after fixing) caught a mistake in my first attempt at this patch, hence I'm including it as part of this patch.

Depends on D69669 <https://reviews.llvm.org/D69669>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69670

Files:
  llvm/test/tools/llvm-readobj/elf-symbol-shndx.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69670.227298.patch
Type: text/x-patch
Size: 470732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/2db5d2a8/attachment-0001.bin>


More information about the llvm-commits mailing list