[llvm] [BOLT][DebugInfo] Add DWARF64 support for BOLT (PR #206437)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 02:22:39 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 h,cpp -- bolt/include/bolt/Core/DIEBuilder.h bolt/include/bolt/Core/DebugData.h bolt/include/bolt/Core/DebugNames.h bolt/lib/Core/BinaryContext.cpp bolt/lib/Core/DebugData.cpp bolt/lib/Core/DebugNames.cpp bolt/lib/Core/GDBIndex.cpp bolt/lib/Rewrite/DWARFRewriter.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/bolt/lib/Core/DebugNames.cpp b/bolt/lib/Core/DebugNames.cpp
index 42f6e9edd..7ee01a59c 100644
--- a/bolt/lib/Core/DebugNames.cpp
+++ b/bolt/lib/Core/DebugNames.cpp
@@ -25,7 +25,7 @@ static void writeOffset(raw_ostream &OS, uint64_t Value,
support::endian::write(OS, Value, llvm::endianness::little);
else
support::endian::write(OS, static_cast<uint32_t>(Value),
- llvm::endianness::little);
+ llvm::endianness::little);
}
DWARF5AcceleratorTable::DWARF5AcceleratorTable(
@@ -115,7 +115,8 @@ void DWARF5AcceleratorTable::setCurrentUnit(DWARFUnit &Unit,
CurrentUnit = nullptr;
CurrentUnitOffset = UnitStartOffset;
// .debug_names is emitted as a single contribution, so mixed DWARF32/DWARF64
- // inputs need one common section offset size. Use DWARF64 if any unit is DWARF64.
+ // inputs need one common section offset size. Use DWARF64 if any unit is
+ // DWARF64.
if (Unit.getFormParams().Format == dwarf::DwarfFormat::DWARF64)
Format = dwarf::DwarfFormat::DWARF64;
std::optional<uint64_t> DWOID = Unit.getDWOId();
@@ -784,7 +785,7 @@ static constexpr uint32_t getDebugNamesHeaderSize() {
void DWARF5AcceleratorTable::emitHeader() const {
constexpr uint32_t HeaderSize = getDebugNamesHeaderSize();
- // .debug_names Header
+ // .debug_names Header
// Length (DWARF64 needs escaped marker)
if (Format == dwarf::DwarfFormat::DWARF64)
support::endian::write(*FullTableStream, dwarf::DW_LENGTH_DWARF64,
``````````
</details>
https://github.com/llvm/llvm-project/pull/206437
More information about the llvm-commits
mailing list