[all-commits] [llvm/llvm-project] 343dce: [llvm-readelf/obj] - Improve error reporting when ...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Fri Nov 20 01:42:05 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 343dceb8315b5c8d7844ec64e6e0931e6ba3655a
      https://github.com/llvm/llvm-project/commit/343dceb8315b5c8d7844ec64e6e0931e6ba3655a
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-11-20 (Fri, 20 Nov 2020)

  Changed paths:
    M llvm/test/tools/llvm-readobj/ELF/groups.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readelf/obj] - Improve error reporting when dumping group sections.

Our code that dumps groups has 3 noticeable issues:
1) It uses `unwrapOrError` in many places.
2) It doesn't allow reporting unique warnings, because the `getGroups` helper is not
   a member of `DumpStyle<ELFT>`.
3) It might just crash. See the comment for `StrTableOrErr->data() + Sym.st_name` line.

In this patch I am starting addressing these points.
For start I've converted one of `unwrapOrError` calls to a unique warning.

Differential revision: https://reviews.llvm.org/D91798




More information about the All-commits mailing list