[llvm] [LLVM][DebugInfo] Refactor some code for easier sharing. (PR #82153)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 17 22:37:01 PST 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 5c96e71d0d49dd55711ccdb57a22d033fe7a8fae a25058ab15b886a46959479c751839f35e9b4ca5 -- llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
index 68adad517f..a271468a9d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
@@ -552,11 +552,10 @@ DWARFDebugNames::NameIndex::extractAbbrev(uint64_t *Offset) {
return Abbrev(Code, dwarf::Tag(Tag), AbbrevOffset, std::move(*AttrEncOr));
}
-uint64_t llvm::FindDebugNamesOffsets(
- DWARFDebugNames::DWARFDebugNamesOffsets &Offsets,
- uint64_t HdrSize,
- dwarf::DwarfFormat Format,
- const DWARFDebugNames::Header &Hdr) {
+uint64_t
+llvm::FindDebugNamesOffsets(DWARFDebugNames::DWARFDebugNamesOffsets &Offsets,
+ uint64_t HdrSize, dwarf::DwarfFormat Format,
+ const DWARFDebugNames::Header &Hdr) {
uint32_t DwarfSize = (Format == llvm::dwarf::DwarfFormat::DWARF32) ? 4 : 8;
uint64_t Offset = HdrSize;
Offsets.CUsBase = Offset;
@@ -736,7 +735,8 @@ uint64_t DWARFDebugNames::NameIndex::getCUOffset(uint32_t CU) const {
uint64_t DWARFDebugNames::NameIndex::getLocalTUOffset(uint32_t TU) const {
assert(TU < Hdr.LocalTypeUnitCount);
const unsigned SectionOffsetSize = dwarf::getDwarfOffsetByteSize(Hdr.Format);
- uint64_t Offset = Offsets.CUsBase + SectionOffsetSize * (Hdr.CompUnitCount + TU);
+ uint64_t Offset =
+ Offsets.CUsBase + SectionOffsetSize * (Hdr.CompUnitCount + TU);
return Section.AccelSection.getRelocatedValue(SectionOffsetSize, &Offset);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/82153
More information about the llvm-commits
mailing list