summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2018-10-16 20:49:15 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2018-10-16 20:49:15 +0000
commitea58c633e63e8acad3f5577ca1634c1ff96a2fb4 (patch)
tree76d0026e14051440ce9bced5613da108edc84a53 /lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
parent8b94274f22d8c346103c5682e7899e8b43db16d7 (diff)
downloadbcm5719-llvm-ea58c633e63e8acad3f5577ca1634c1ff96a2fb4.tar.gz
bcm5719-llvm-ea58c633e63e8acad3f5577ca1634c1ff96a2fb4.zip
Code cleanup: Remove DWARFDebugInfoEntry::m_empty_children
It merges DWARFDebugInfoEntry's m_empty_children into m_has_children. m_empty_children was implemented by rL144983. As Greg confirmed m_has_children was used to represent what was in the DWARF in the byte that follows the DW_TAG. m_empty_children was used for DIEs that said they had children but actually only contain a single NULL tag. It is fine to not differentiate between the two. Also changed assert()->lldbassert() for m_abbr_idx 16-bit overflow check as that could be a tough bug to catch if it ever happens. I have checked all calls of HasChildren() that this change should not matter to them. The code even wants to know if there are any children - it does not matter how the children presence is coded in the binary. Patch written based on suggestions by Greg Clayton. Differential Revision: https://reviews.llvm.org/D53321 llvm-svn: 344644
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index d26556d73e2..1b1f3ffea0b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -223,7 +223,7 @@ void DWARFUnit::ExtractDIEsRWLocked() {
// the list (saves up to 25% in C++ code), we need a way to let the
// DIE know that it actually doesn't have children.
if (!m_die_array.empty())
- m_die_array.back().SetEmptyChildren(true);
+ m_die_array.back().SetHasChildren(false);
}
} else {
die.SetParentIndex(m_die_array.size() - die_index_stack[depth - 1]);
@@ -263,7 +263,7 @@ void DWARFUnit::ExtractDIEsRWLocked() {
if (!m_die_array.empty()) {
if (m_first_die) {
// Only needed for the assertion.
- m_first_die.SetEmptyChildren(m_die_array.front().GetEmptyChildren());
+ m_first_die.SetHasChildren(m_die_array.front().HasChildren());
lldbassert(m_first_die == m_die_array.front());
}
m_first_die = m_die_array.front();
OpenPOWER on IntegriCloud