From 2057585852ce6689e509871903d5cd8ab2c28eb3 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 8 May 2019 10:09:57 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360235 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp b/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp index f46545ff3d2..31b324e5eb2 100644 --- a/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp +++ b/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))); -- 2.40.0