[PATCH] D140788: [DWARFLinkerNext] add AddressesMap interface.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 30 16:35:04 PST 2022
avl added inline comments.
================
Comment at: llvm/include/llvm/DWARFLinkerNext/AddressesMap.h:38
+ /// \returns true and sets AddrAdjust if it is the case.
+ virtual bool isLiveVariable(const DWARFDie &DIE, int64_t &AddrAdjust) = 0;
+
----------------
avl wrote:
> tschuett wrote:
> > Is this the same as returning `std::optional<int64_t>`?
> isLiveVariable can change passed value. Not just return new value:
>
>
> ```
> AddrAdjust -= uint64_t(*Reloc.Mapping->getValue().ObjectAddress);
> ```
please ignore above comment. yes, we can remove passing the value by reference. in this case it is probably better to rename the method:
std::optional<int64_t> getVariableAddress(const DWARFDie &DIE)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140788/new/
https://reviews.llvm.org/D140788
More information about the llvm-commits
mailing list