diff options
Diffstat (limited to 'llvm/lib/DebugInfo')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFDebugFrame.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp b/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp index 8426bf95bed..c1a088e9bab 100644 --- a/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp +++ b/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp @@ -30,7 +30,6 @@ bool DWARFAbbreviationDeclarationSet::extract(DataExtractor Data, DWARFAbbreviationDeclaration AbbrDecl; uint32_t PrevAbbrCode = 0; while (AbbrDecl.extract(Data, OffsetPtr)) { - Decls.push_back(AbbrDecl); if (FirstAbbrCode == 0) { FirstAbbrCode = AbbrDecl.getCode(); } else { @@ -40,6 +39,7 @@ bool DWARFAbbreviationDeclarationSet::extract(DataExtractor Data, } } PrevAbbrCode = AbbrDecl.getCode(); + Decls.push_back(std::move(AbbrDecl)); } return BeginOffset != *OffsetPtr; } @@ -82,7 +82,7 @@ void DWARFDebugAbbrev::extract(DataExtractor Data) { uint32_t CUAbbrOffset = Offset; if (!AbbrDecls.extract(Data, &Offset)) break; - AbbrDeclSets[CUAbbrOffset] = AbbrDecls; + AbbrDeclSets[CUAbbrOffset] = std::move(AbbrDecls); } } diff --git a/llvm/lib/DebugInfo/DWARFDebugFrame.cpp b/llvm/lib/DebugInfo/DWARFDebugFrame.cpp index a33548e95b0..dfa7e82224e 100644 --- a/llvm/lib/DebugInfo/DWARFDebugFrame.cpp +++ b/llvm/lib/DebugInfo/DWARFDebugFrame.cpp @@ -202,7 +202,8 @@ public: SmallString<8> Augmentation, uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor, uint64_t ReturnAddressRegister) : FrameEntry(FK_CIE, Offset, Length), Version(Version), - Augmentation(Augmentation), CodeAlignmentFactor(CodeAlignmentFactor), + Augmentation(std::move(Augmentation)), + CodeAlignmentFactor(CodeAlignmentFactor), DataAlignmentFactor(DataAlignmentFactor), ReturnAddressRegister(ReturnAddressRegister) {} |

