[Lldb-commits] [lldb] afe6ab7 - [lldb][DebugNames] Only skip processing of DW_AT_declarations for class/union types (#94400)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 4 14:17:55 PDT 2024
Author: Michael Buch
Date: 2024-06-04T22:17:51+01:00
New Revision: afe6ab7586f7078cc410f6162bd9851e48e2a286
URL: https://github.com/llvm/llvm-project/commit/afe6ab7586f7078cc410f6162bd9851e48e2a286
DIFF: https://github.com/llvm/llvm-project/commit/afe6ab7586f7078cc410f6162bd9851e48e2a286.diff
LOG: [lldb][DebugNames] Only skip processing of DW_AT_declarations for class/union types (#94400)
This is a follow-up of
https://github.com/llvm/llvm-project/pull/92328#issuecomment-2145849441
Clang attaches `DW_AT_declaration` to static inline data members and
`dsymutil` indexes these constants. Skipping these caused the expression
evaluator to fail to find such constants when using DWARFv5.
Fixes `TestConstStaticIntegralMember.py` on DWARFv5.
Added:
Modified:
lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
index 56717bab1ecd8..6330470b970e7 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -87,7 +87,8 @@ bool DebugNamesDWARFIndex::ProcessEntry(
return true;
// Clang erroneously emits index entries for declaration DIEs in case when the
// definition is in a type unit (llvm.org/pr77696). Weed those out.
- if (die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
+ if (die.IsStructUnionOrClass() &&
+ die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
return true;
return callback(die);
}
More information about the lldb-commits
mailing list