[PATCH] D140788: [DWARFLinkerNext] add AddressesMap interface.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 16:26:49 PST 2022


avl added inline comments.


================
Comment at: llvm/include/llvm/DWARFLinkerNext/AddressesMap.h:17
+namespace llvm {
+namespace dwarflinker {
+
----------------
tschuett wrote:
> There is no `next` in the namespace? You can use nested namespaces.
Current DWARFLinker does not use special namespace. Thus, name dwarflinker is free. I used it as it is shorter.


================
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;
+
----------------
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);
```


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