[llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't synthesize one)

llvm-svn: 254492
This commit is contained in:
David Blaikie 2015-12-02 07:09:26 +00:00
parent 237916b537
commit 20f52662d4
1 changed files with 7 additions and 2 deletions

View 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;
}