[PATCH] D57939: Refactor RelocVisitor and fix computation of SHT_RELA-typed relocation entries

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 11:57:36 PST 2019


dblaikie added inline comments.
Herald added a subscriber: jdoerfert.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFRelocMap.h:24
+  object::RelocationResolver Resolver;
+  uint64_t S;
 };
----------------
Could this have a more verbose/self-descriptive name?


================
Comment at: lib/DebugInfo/DWARF/DWARFDataExtractor.cpp:27
+    *SecNdx = E->SectionIndex;
+  return E->Resolver(E->Reloc, E->S, A).getValueOr(A);
 }
----------------
Could RelocAddrEntry maybe have a "resolve" function that handles most of this? (eg: passes in E->Reloc and E->S, handles the "getValueOr" part too, probably - and/or maybe the "getValueOr" part could be handled by having a default/trivial Resolver that returns A? Less branching in the code required that way)


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57939





More information about the llvm-commits mailing list