diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-10-04 16:55:56 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-10-04 16:55:56 +0000 |
commit | c6cc58e7032239529a5ceaab3dab4aa9e7f898e7 (patch) | |
tree | 4a5993f3e6b62d9070656d336bf365ee7a58f2ba /llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp | |
parent | cda2aa823ede9f83577dc90c77063e87ab2debd3 (diff) | |
download | bcm5719-llvm-c6cc58e7032239529a5ceaab3dab4aa9e7f898e7.tar.gz bcm5719-llvm-c6cc58e7032239529a5ceaab3dab4aa9e7f898e7.zip |
Remove unnecessary copying or replace it with moves in a bunch of places.
NFC.
llvm-svn: 219061
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp | 4 |
1 files changed, 2 insertions, 2 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); } } |