clayborg added a comment.
A better solution here would be to have two functions: one for parsing the Unit
DIE only and one for parsing all DIEs:
class DWARFUnit {
void ExtractUnitDIEIfNeeded();
size_t ExtractDIEsIfNeeded();
}
Then the code becomes much simpler, we don't need the "m_die_array_size"
function and logic is much cleaner,
DWARFUnit::ExtractUnitDIEIfNeeded() will extract into m_first_die only and
won't touch m_die_array at all. DWARFUnit::ExtractDIEsIfNeeded() will extract
all DIEs into m_die_array. Then there is no need for worrying about
m_die_array.size().
https://reviews.llvm.org/D46810
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits