[llvm] Improve DWARFDebugLine::LineTable::lookupAddressRangeImpl(...) to act as exptected. (PR #226625)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 19:15:42 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index 4731bf154..eefd78120 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -1456,9 +1456,9 @@ bool DWARFDebugLine::LineTable::lookupAddressRangeImpl(
// The matching row range should end at the next row's address, unless the
// last row is the last row in the sequence. If we don't do this and we have
// outlined functions, we can end up with a range that is empty.
- uint64_t MatchingRangeHighPC = Rows[LastRowIndex].EndSequence ?
- Rows[LastRowIndex].Address.Address :
- Rows[LastRowIndex + 1].Address.Address;
+ uint64_t MatchingRangeHighPC = Rows[LastRowIndex].EndSequence
+ ? Rows[LastRowIndex].Address.Address
+ : Rows[LastRowIndex + 1].Address.Address;
AddressRange MatchingRowRange(Rows[FirstRowIndex].Address.Address,
MatchingRangeHighPC);
if (RowRanges.contains(MatchingRowRange)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/226625
More information about the llvm-commits
mailing list