[llvm] [LLVM][DWARF] Add support for monolithic types in .debug_names (PR #70515)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 16:45:33 PST 2023
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 d3cbf9fb64399dbf8718c600d8ac63bd1afaa9d1 3fb2959f09df55e14f47176e0ce910ff3e0e2c88 -- llvm/include/llvm/CodeGen/AccelTable.h llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h llvm/lib/CodeGen/AsmPrinter/DwarfFile.h llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h llvm/lib/DWARFLinker/DWARFStreamer.cpp llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/DWARFLinker/DWARFStreamer.cpp b/llvm/lib/DWARFLinker/DWARFStreamer.cpp
index 79536b19dc..cd649c328e 100644
--- a/llvm/lib/DWARFLinker/DWARFStreamer.cpp
+++ b/llvm/lib/DWARFLinker/DWARFStreamer.cpp
@@ -311,15 +311,15 @@ void DwarfStreamer::emitDebugNames(DWARF5AccelTable &Table) {
/// llvm-dwarfutil doesn't support type units + .debug_names right now.
// FIXME: add support for type units + .debug_names. For now the behavior is
// unsuported.
- emitDWARF5AccelTable(Asm.get(), Table, CompUnits,
- [&](const DWARF5AccelTableData &Entry)
- -> std::optional<
- DWARF5AccelTable::UnitIndexAndEncoding> {
- if (UniqueIdToCuMap.size() > 1)
- return {{UniqueIdToCuMap[Entry.getUnitID()],
- {dwarf::DW_IDX_compile_unit, Form}}};
- return std::nullopt;
- });
+ emitDWARF5AccelTable(
+ Asm.get(), Table, CompUnits,
+ [&](const DWARF5AccelTableData &Entry)
+ -> std::optional<DWARF5AccelTable::UnitIndexAndEncoding> {
+ if (UniqueIdToCuMap.size() > 1)
+ return {{UniqueIdToCuMap[Entry.getUnitID()],
+ {dwarf::DW_IDX_compile_unit, Form}}};
+ return std::nullopt;
+ });
}
void DwarfStreamer::emitAppleNamespaces(
diff --git a/llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp b/llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp
index 268f3a177e..355cfae3a6 100644
--- a/llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp
+++ b/llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp
@@ -234,15 +234,15 @@ void DwarfEmitterImpl::emitDebugNames(DWARF5AccelTable &Table,
DIEInteger::BestForm(/*IsSigned*/ false, (uint64_t)CUidToIdx.size() - 1);
// FIXME: add support for type units + .debug_names. For now the behavior is
// unsuported.
- emitDWARF5AccelTable(Asm.get(), Table, CUOffsets,
- [&](const DWARF5AccelTableData &Entry)
- -> std::optional<
- DWARF5AccelTable::UnitIndexAndEncoding> {
- if (CUidToIdx.size() > 1)
- return {{CUidToIdx[Entry.getUnitID()],
- {dwarf::DW_IDX_compile_unit, Form}}};
- return std::nullopt;
- });
+ emitDWARF5AccelTable(
+ Asm.get(), Table, CUOffsets,
+ [&](const DWARF5AccelTableData &Entry)
+ -> std::optional<DWARF5AccelTable::UnitIndexAndEncoding> {
+ if (CUidToIdx.size() > 1)
+ return {{CUidToIdx[Entry.getUnitID()],
+ {dwarf::DW_IDX_compile_unit, Form}}};
+ return std::nullopt;
+ });
}
void DwarfEmitterImpl::emitAppleNamespaces(
``````````
</details>
https://github.com/llvm/llvm-project/pull/70515
More information about the llvm-commits
mailing list