Remove DWARFUnit::ClearDIEs parameter keep_compile_unit_die

It has been now always passed as true and during planned D46810 it would no
longer make sense.

llvm-svn: 333287
This commit is contained in:
Jan Kratochvil 2018-05-25 16:11:45 +00:00
parent 8f66adecd0
commit a185c71959
3 changed files with 6 additions and 7 deletions

View File

@ -288,7 +288,7 @@ void DWARFUnit::SetAddrBase(dw_addr_t addr_base,
m_base_obj_offset = base_obj_offset;
}
void DWARFUnit::ClearDIEs(bool keep_compile_unit_die) {
void DWARFUnit::ClearDIEs() {
if (m_die_array.size() > 1) {
// std::vectors never get any smaller when resized to a smaller size, or
// when clear() or erase() are called, the size will report that it is
@ -300,12 +300,11 @@ void DWARFUnit::ClearDIEs(bool keep_compile_unit_die) {
// Save at least the compile unit DIE
DWARFDebugInfoEntry::collection tmp_array;
m_die_array.swap(tmp_array);
if (keep_compile_unit_die)
m_die_array.push_back(tmp_array.front());
m_die_array.push_back(tmp_array.front());
}
if (m_dwo_symbol_file)
m_dwo_symbol_file->GetCompileUnit()->ClearDIEs(keep_compile_unit_die);
m_dwo_symbol_file->GetCompileUnit()->ClearDIEs();
}
void DWARFUnit::BuildAddressRangeTable(SymbolFileDWARF *dwarf,
@ -403,7 +402,7 @@ void DWARFUnit::BuildAddressRangeTable(SymbolFileDWARF *dwarf,
// Keep memory down by clearing DIEs if this generate function caused them to
// be parsed
if (clear_dies)
ClearDIEs(true);
ClearDIEs();
}
lldb::ByteOrder DWARFUnit::GetByteOrder() const {

View File

@ -99,7 +99,7 @@ public:
dw_addr_t GetRangesBase() const { return m_ranges_base; }
void SetAddrBase(dw_addr_t addr_base, dw_addr_t ranges_base,
dw_offset_t base_obj_offset);
void ClearDIEs(bool keep_compile_unit_die);
void ClearDIEs();
void BuildAddressRangeTable(SymbolFileDWARF *dwarf,
DWARFDebugAranges *debug_aranges);

View File

@ -96,7 +96,7 @@ void ManualDWARFIndex::Index() {
//----------------------------------------------------------------------
for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) {
if (clear_cu_dies[cu_idx])
debug_info.GetCompileUnitAtIndex(cu_idx)->ClearDIEs(true);
debug_info.GetCompileUnitAtIndex(cu_idx)->ClearDIEs();
}
}