[all-commits] [llvm/llvm-project] aadbe2: [llvm-readobj] - Introduce `forEachRelocationDo` h...

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


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

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

  Log Message:
  -----------
  [llvm-readobj] - Introduce `forEachRelocationDo` helper.

Our `printStackSize` implementation currently uses
API like `RelocationRef`, `object::symbol_iterator`.
It is not ideal as it doesn't allow
to handle possible error conditions properly.

Some time ago I started rewriting it and this NFC patch is
a one more step toward to it. Here I am introducing the
`forEachRelocationDo` helper. With it it is possible to iterate
over all kinds of relocations, what is helpful for improving
the code in `printStackSize` and around.

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




More information about the All-commits mailing list