[llvm] [LLVM][DWARF] Change .debug_names abbrev to be an index (PR #81200)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 08:58:33 PST 2024


================
@@ -330,6 +325,12 @@ class DWARF5AccelTableData : public AccelTableData {
     return OffsetAndUnitID(*ParentOffset, getUnitID());
   }
 
+  /// Sets AbbrevIndex for an Entry.
+  void setAbbrevIndex(uint16_t AbbrevIndex) { AbbrevID = AbbrevIndex; }
+
+  /// Returns AbbrevIndex for an Entry.
+  uint16_t getAbbrevIndex() const { return AbbrevID; }
+
----------------
dwblaikie wrote:

FWIW, the spec calls these "abbreviation codes" and might be good to stick with that language (though the debug_info DIE code in LLVM calls them "abbreviation numbers" (in code as AbbrevNumber in the DIE, and just as "Number" in the Abbrev itself)- so I wouldn't object to that for local consistency)

https://github.com/llvm/llvm-project/pull/81200


More information about the llvm-commits mailing list