[PATCH] D91530: [llvm-readobj] - Introduce `forEachRelocationDo` helper. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 04:25:40 PST 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added a subscriber: rupprecht.
Herald added a project: LLVM.
grimar requested review of this revision.

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 it `printStackSize` and around.

I've made some progress in improving this area and going to post
other related follow-up patches really soon.


https://reviews.llvm.org/D91530

Files:
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91530.305470.patch
Type: text/x-patch
Size: 13377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201116/12339b37/attachment.bin>


More information about the llvm-commits mailing list