forked from OSchip/llvm-project
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:
parent
cf6c19c2d3
commit
ab0f18076b
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue