[llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't synthesize...
[oota-llvm.git] / lib / DebugInfo / DWARF / DWARFUnitIndex.cpp
index e8e7441d976927c35c536d2cb99e426e3f2327b8..1f1921649b57ae760ce9d711a53c11e0b8def6be 100644 (file)
@@ -31,8 +31,13 @@ void DWARFUnitIndex::Header::dump(raw_ostream &OS) const {
 
 bool DWARFUnitIndex::parse(DataExtractor IndexData) {
   bool b = parseImpl(IndexData);
-  if (!b)
-    *this = DWARFUnitIndex(InfoColumnKind);
+  if (!b) {
+    // Make sure we don't try to dump anything
+    Header.NumBuckets = 0;
+    // Release any partially initialized data.
+    ColumnKinds.reset();
+    Rows.reset();
+  }
   return b;
 }