[DebugInfo] Fix use-after-move warning. NFCI.

Don't rely on DWARFAbbreviationDeclarationSet::extract cleaning the struct up for reuse - the analyzers don't like it.

llvm-svn: 360235
This commit is contained in:
Simon Pilgrim 2019-05-08 10:09:57 +00:00
parent 97a0c54179
commit 2a09a6cfe2
1 changed files with 1 additions and 1 deletions

View File

@ -83,12 +83,12 @@ void DWARFDebugAbbrev::parse() const {
if (!Data)
return;
uint32_t Offset = 0;
DWARFAbbreviationDeclarationSet AbbrDecls;
auto I = AbbrDeclSets.begin();
while (Data->isValidOffset(Offset)) {
while (I != AbbrDeclSets.end() && I->first < Offset)
++I;
uint32_t CUAbbrOffset = Offset;
DWARFAbbreviationDeclarationSet AbbrDecls;
if (!AbbrDecls.extract(*Data, &Offset))
break;
AbbrDeclSets.insert(I, std::make_pair(CUAbbrOffset, std::move(AbbrDecls)));