diff options
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp index e8e7441d976..1f1921649b5 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp @@ -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; } |