diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h @@ -52,8 +52,10 @@ DWARFAttributes(); ~DWARFAttributes(); - void Append(const DWARFUnit *cu, dw_offset_t attr_die_offset, - dw_attr_t attr, dw_form_t form); + void Append(const DWARFUnit *cu, dw_offset_t attr_die_offset, dw_attr_t attr, + dw_form_t form) { + m_infos.emplace_back(cu, attr_die_offset, attr, form); + } const DWARFUnit *CompileUnitAtIndex(uint32_t i) const { return m_infos[i].cu; } @@ -77,6 +79,11 @@ // case we have DW_FORM_ref_addr values dw_offset_t die_offset; DWARFAttribute attr; + + AttributeValue(const DWARFUnit *cu, dw_offset_t die_offset, dw_attr_t attr, + dw_form_t form) + : cu(cu), die_offset(die_offset), + attr(attr, form, DWARFFormValue::ValueType()) {} }; typedef llvm::SmallVector collection; collection m_infos; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp @@ -25,13 +25,6 @@ return UINT32_MAX; } -void DWARFAttributes::Append(const DWARFUnit *cu, dw_offset_t attr_die_offset, - dw_attr_t attr, dw_form_t form) { - AttributeValue attr_value = { - cu, attr_die_offset, {attr, form, DWARFFormValue::ValueType()}}; - m_infos.push_back(attr_value); -} - bool DWARFAttributes::ExtractFormValueAtIndex( uint32_t i, DWARFFormValue &form_value) const { const DWARFUnit *cu = CompileUnitAtIndex(i);