[lld] [llvm] [Symbolizer] Support for Missing Line Numbers. (PR #82240)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 01:09:03 PDT 2024
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 a0283987d07c2d4ce2cc5a4adaee0512f9553797 45ef7f9b553b28b1d630f53fc868633021dfffed -- bolt/lib/Core/BinaryFunction.cpp lld/Common/DWARF.cpp llvm/include/llvm/DebugInfo/DIContext.h llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h llvm/lib/DebugInfo/DWARF/DWARFContext.cpp llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp llvm/lib/DebugInfo/Symbolize/Symbolize.cpp llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
``````````
</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 23ed45b1d8..dae29ae4ef 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -1340,25 +1340,28 @@ std::pair<uint32_t, bool> DWARFDebugLine::LineTable::lookupAddressImpl(
if (It == Sequences.end() || It->SectionIndex != Address.SectionIndex)
return {UnknownRowIndex, false};
- uint32_t RowIndex = UnknownRowIndex;bool IsApproximate = false;
+ uint32_t RowIndex = UnknownRowIndex;
+ bool IsApproximate = false;
if (LineKind == DILineInfoSpecifier::ApproximateLineKind::Before) {
while (Address.Address >= It->LowPC) {
RowIndex = findRowInSeq(*It, Address);
- if(RowIndex!=UnknownRowIndex && Rows[RowIndex].Line)
+ if (RowIndex != UnknownRowIndex && Rows[RowIndex].Line)
break;
IsApproximate = true;
- if(RowIndex!=UnknownRowIndex && Rows[RowIndex].PrologueEnd)break;
+ if (RowIndex != UnknownRowIndex && Rows[RowIndex].PrologueEnd)
+ break;
--Address.Address;
- }
+ }
} else if (LineKind == DILineInfoSpecifier::ApproximateLineKind::After) {
while (Address.Address <= It->HighPC) {
RowIndex = findRowInSeq(*It, Address);
- if (RowIndex!=UnknownRowIndex && Rows[RowIndex].Line)
+ if (RowIndex != UnknownRowIndex && Rows[RowIndex].Line)
break;
IsApproximate = true;
- if(RowIndex!=UnknownRowIndex && Rows[RowIndex].EpilogueBegin)break;
+ if (RowIndex != UnknownRowIndex && Rows[RowIndex].EpilogueBegin)
+ break;
++Address.Address;
- }
+ }
} else {
RowIndex = findRowInSeq(*It, Address);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/82240
More information about the llvm-commits
mailing list