[llvm] [DWARFLinker] Key str_offsets_base and unit_type on the unit root (PR #219398)
Arcadiy Ivanov via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 11:44:04 PDT 2026
================
@@ -188,7 +188,14 @@ void DwarfStreamer::emitCompileUnitHeader(CompileUnit &Unit,
Asm->emitInt16(DwarfVersion);
if (DwarfVersion >= 5) {
- Asm->emitInt8(dwarf::DW_UT_compile);
+ // The unit type must match the cloned root DIE. DW_UT_partial has the same
+ // header layout as DW_UT_compile. DW_UT_skeleton adds an 8-byte dwo_id
+ // (DWARFv5 section 7.5.1.2) that the 12-byte header size here and in
+ // computeNextUnitOffset() does not account for, so a skeleton root still
+ // gets DW_UT_compile.
----------------
arcivanov wrote:
Reduced the verbosity, double-checked for comment redundancy in the entire batch. References should remain only when they are not stated elsewhere in the code nearby and where the lack of adherence to them was the cause of the bug.
https://github.com/llvm/llvm-project/pull/219398
More information about the llvm-commits
mailing list