Fix a "memset clearing an object of non-trivial type" warning in DWARFFormValue

This is diagnosed by gcc-8. The ValueType struct already has a default
constructor which performs zero-initialization, so we can just call that
instead of using memset.

llvm-svn: 357056
This commit is contained in:
Pavel Labath 2019-03-27 10:02:36 +00:00
parent cf6c19c2d3
commit ab0f18076b
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ DWARFFormValue::DWARFFormValue(const DWARFUnit *cu, dw_form_t form)
void DWARFFormValue::Clear() {
m_cu = nullptr;
m_form = 0;
memset(&m_value, 0, sizeof(m_value));
m_value = ValueTypeTag();
}
bool DWARFFormValue::ExtractValue(const DWARFDataExtractor &data,