summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-08 10:09:57 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-08 10:09:57 +0000
commit2a09a6cfe2084a0ec869f937b20bc140fff0dbcb (patch)
treed19fa750b88963fede8557da90e2a9ea48d883d5 /llvm/lib
parent97a0c5417906556014781b33a938bd8133baa336 (diff)
downloadbcm5719-llvm-2a09a6cfe2084a0ec869f937b20bc140fff0dbcb.tar.gz
bcm5719-llvm-2a09a6cfe2084a0ec869f937b20bc140fff0dbcb.zip
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp
index f46545ff3d2..31b324e5eb2 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp
@@ -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)));
OpenPOWER on IntegriCloud