[llvm] [LLVM][DWARF] Change .debug_names abbrev to be an index (PR #81200)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 15:53:27 PST 2024
================
@@ -467,26 +427,43 @@ getFormForIdxParent(const DenseSet<OffsetAndUnitID> &IndexedOffsets,
return dwarf::Form::DW_FORM_flag_present;
}
+void DebugNamesAbbrev::Profile(FoldingSetNodeID &ID) const {
+ ID.AddInteger(DieTag);
+ for (const DebugNamesAbbrev::AttributeEncoding &Enc : AttrVect) {
+ ID.AddInteger(Enc.Index);
+ if (Enc.Index == dwarf::DW_IDX_parent)
+ ID.AddInteger(Enc.Form);
----------------
ayermolo wrote:
For DW_IDX_parent it can be DW_FORM_flag_present or DW_FORM_ref4. It depends on a DIE. For all others form is unique per module.
For DW_IDX_die_offset it's always DW_IDX_die_offset.
For DW_IDX_compile_unit/DW_IDX_type_unit it can change based on size of CU/TU lists in the module. So DW_FORM_data{1,2,4}.
https://github.com/llvm/llvm-project/pull/81200
More information about the llvm-commits
mailing list