summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index fea31e80bdf..719478537ac 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -290,16 +290,15 @@ void ManualDWARFIndex::IndexUnitImpl(
const DWARFDebugInfoEntry *parent = die.GetParent();
bool is_method = false;
if (parent) {
- dw_tag_t parent_tag = parent->Tag();
- if (parent_tag == DW_TAG_class_type ||
- parent_tag == DW_TAG_structure_type) {
+ DWARFDIE parent_die(&unit, parent);
+ if (parent_die.IsStructClassOrUnion())
is_method = true;
- } else {
+ else {
if (specification_die_form.IsValid()) {
DWARFDIE specification_die =
unit.GetSymbolFileDWARF()->DebugInfo()->GetDIE(
DIERef(specification_die_form));
- if (specification_die.GetParent().IsStructOrClass())
+ if (specification_die.GetParent().IsStructClassOrUnion())
is_method = true;
}
}
OpenPOWER on IntegriCloud