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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 01:32:15 PST 2020


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:5673
     }
-    if (opts::RawRelr) {
+    if (RawRelr) {
       for (const Elf_Relr &R : *RangeOrErr)
----------------
jhenderson wrote:
> I don't really mind either way, but what's the motivation for passing in the RawRelr variable, rather than continuing to use `opts::RawRelr`?
In my understanding, the `opts::RawRelr` option is related to relocation printing:
"Do not decode relocations in SHT_RELR section, display raw contents"

`forEachRelocationDo` is a more general API which can be used for other things as well.
Perhaps it is not ideal to use such flags inside.


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

https://reviews.llvm.org/D91530



More information about the llvm-commits mailing list