[PATCH] D153080: Emit DW_LLE_base_address + DW_LLE_offset_pairs instead of DW_LLE_start_length in debug_loclists section
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 20:28:11 PDT 2023
JDevlieghere added inline comments.
================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:1974
+ // Calculate value of the DW_LLE_base_address.
+ auto FirstLocation = (*OriginalLocations)[0];
+
----------------
Is `OriginalLocations` guaranteed to be non empty? Also I would use `OriginalLocations->front()` here.
================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:1988
+ LinkedLocationExpressionsFrag.BaseAddress;
+ assert(LowPCVal >= 0 && "Low PC value should not be negative!");
LinkedExpression.Range = {
----------------
nit: Let's drop the exclamation mark: other asserts in this file either use a period or no punctuation at all.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153080/new/
https://reviews.llvm.org/D153080
More information about the llvm-commits
mailing list