[PATCH] D153080: Emit DW_LLE_base_address + DW_LLE_offset_pairs instead of DW_LLE_start_length in debug_loclists section
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 17 00:36:25 PDT 2023
avl accepted this revision.
avl added a comment.
This revision is now accepted and ready to land.
LGTM. Though, wait a couple of days for other reviewers.
================
Comment at: llvm/lib/DWARFLinker/DWARFStreamer.cpp:620
+ bool BaseAddressEmitted = false;
+ uint64_t BaseAddress = 0;
----------------
not necessary to do that way, but if you found this useful: It might be a bit simpler if BaseAddress would be std::optional<uint64_t>. Then we do not need BaseAddressEmitted flag. A bit shorter and no connected variables.
```
std::optional<uint64_t> BaseAddress;
if (!BaseAddress) {
BaseAddress = LocExpression.Range->LowPC;
...
MS->emitIntValue(*BaseAddress, AddressSize);
...
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153080/new/
https://reviews.llvm.org/D153080
More information about the llvm-commits
mailing list