[llvm] [LLVM][DWARF] Change .debug_names abbrev to be an index (PR #81200)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 08:05:32 PST 2024
================
@@ -360,6 +360,47 @@ class DWARF5AccelTable : public AccelTable<DWARF5AccelTableData> {
unsigned Index;
DWARF5AccelTableData::AttributeEncoding Encoding;
};
+
+ struct AbbrevDescriptor {
+ uint32_t CompUnit : 1;
+ uint32_t TypeUnit : 1;
+ uint32_t DieOffset : 1;
+ uint32_t Parent : 2;
+ uint32_t TypeHash : 1;
+ uint32_t Tag : 26;
+ };
+ struct TagIndex {
+ uint32_t DieTag;
+ uint32_t Index;
+ };
+ struct cmpByTagIndex {
+ bool operator()(const TagIndex &LHS, const TagIndex &RHS) const {
+ return LHS.Index < RHS.Index;
+ }
+ };
----------------
dwblaikie wrote:
This is probably better as `inline bool operator<(const TagIndex &LHS, const TagIndex &RHS)` then it doesn't need to be passed as a parameter to the map later, it'll be the default.
https://github.com/llvm/llvm-project/pull/81200
More information about the llvm-commits
mailing list