[lld] r238030 - [ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.
Benjamin Kramer
benny.kra at GOOGLEMAIL.com
Fri May 22 09:01:21 PDT 2015
Author: d0k
Date: Fri May 22 11:01:21 2015
New Revision: 238030
URL: http://llvm.org/viewvc/llvm-project?rev=238030&view=rev
Log:
[ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h
lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.cpp
lld/trunk/lib/ReaderWriter/ELF/Reader.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h?rev=238030&r1=238029&r2=238030&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h Fri May 22 11:01:21 2015
@@ -61,7 +61,7 @@ template <class ELFT>
void MipsDynamicLibraryWriter<ELFT>::createImplicitFiles(
std::vector<std::unique_ptr<File>> &result) {
DynamicLibraryWriter<ELFT>::createImplicitFiles(result);
- result.push_back(std::move(_writeHelper.createRuntimeFile()));
+ result.push_back(_writeHelper.createRuntimeFile());
}
template <class ELFT>
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h?rev=238030&r1=238029&r2=238030&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h Fri May 22 11:01:21 2015
@@ -113,7 +113,7 @@ template <class ELFT>
void MipsExecutableWriter<ELFT>::createImplicitFiles(
std::vector<std::unique_ptr<File>> &result) {
ExecutableWriter<ELFT>::createImplicitFiles(result);
- result.push_back(std::move(_writeHelper.createRuntimeFile()));
+ result.push_back(_writeHelper.createRuntimeFile());
}
template <class ELFT>
Modified: lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.cpp?rev=238030&r1=238029&r2=238030&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.cpp Fri May 22 11:01:21 2015
@@ -242,7 +242,7 @@ template <class ELFT> void OutputELFWrit
// Don't create .symtab and .strtab sections if we're going to
// strip all the symbols.
if (!_ctx.stripSymbols()) {
- _symtab = std::move(this->createSymbolTable());
+ _symtab = this->createSymbolTable();
_strtab.reset(new (_alloc) StringTable<ELFT>(
_ctx, ".strtab", TargetLayout<ELFT>::ORDER_STRING_TABLE));
_layout.addSection(_symtab.get());
@@ -270,10 +270,10 @@ template <class ELFT> void OutputELFWrit
}
if (_ctx.isDynamic()) {
- _dynamicTable = std::move(createDynamicTable());
+ _dynamicTable = createDynamicTable();
_dynamicStringTable.reset(new (_alloc) StringTable<ELFT>(
_ctx, ".dynstr", TargetLayout<ELFT>::ORDER_DYNAMIC_STRINGS, true));
- _dynamicSymbolTable = std::move(createDynamicSymbolTable());
+ _dynamicSymbolTable = createDynamicSymbolTable();
_hashTable.reset(new (_alloc) HashSection<ELFT>(
_ctx, ".hash", TargetLayout<ELFT>::ORDER_HASH));
// Set the hash table in the dynamic symbol table so that the entries in the
Modified: lld/trunk/lib/ReaderWriter/ELF/Reader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Reader.cpp?rev=238030&r1=238029&r2=238030&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Reader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Reader.cpp Fri May 22 11:01:21 2015
@@ -29,7 +29,7 @@ namespace lld {
void Registry::addSupportELFObjects(ELFLinkingContext &ctx) {
// Tell registry about the ELF object file parser.
- add(std::move(ctx.getTargetHandler().getObjReader()));
+ add(ctx.getTargetHandler().getObjReader());
// Tell registry about the relocation name to number mapping for this arch.
ctx.registerRelocationNames(*this);
More information about the llvm-commits
mailing list