[PATCH] D93106: [dsymutil][DWARFLinker][NFC] make AddressManager not depending on the order of checks for relocations.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 10:05:49 PST 2021


JDevlieghere added inline comments.


================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.h:89
+    bool
+    enumerateRelocations(uint64_t StartPos, uint64_t EndPos,
+                         function_ref<bool(const ValidReloc &rel)> RelHandler);
----------------
avl wrote:
> JDevlieghere wrote:
> > Can we return a list of relocations as an alternative to using a callback? 
> I like that callback approach since it allows not to move/copy/resize/fill containers. But if you think it would be better to return list of found relocations then I would change it accordingly.
Personally I find callbacks always make it harder to reason about things. If there's not measurable performance overhead I'd prefer returning a list, but otherwise I'm find with a callback. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93106



More information about the llvm-commits mailing list