summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-03-27 10:02:36 +0000
committerPavel Labath <pavel@labath.sk>2019-03-27 10:02:36 +0000
commitab0f18076b11972429e7d04cb818582f949f03b5 (patch)
tree27788adc31490421a6cf9dd883dc825151c713af
parentcf6c19c2d35c4dc22fc6e3c405ab7a4071848fc2 (diff)
downloadbcm5719-llvm-ab0f18076b11972429e7d04cb818582f949f03b5.tar.gz
bcm5719-llvm-ab0f18076b11972429e7d04cb818582f949f03b5.zip
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
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
index ce1683dcc55..e809daa65f8 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -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,
OpenPOWER on IntegriCloud