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

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 12:13:06 PST 2021


avl 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);
----------------
JDevlieghere wrote:
> 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. 
In this concrete case there is no performance difference. So I changed to the container.


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