[ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.

llvm-svn: 238030
This commit is contained in:
Benjamin Kramer 2015-05-22 16:01:21 +00:00
parent fc99f3d43f
commit 91d8cfd698
4 changed files with 6 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -242,7 +242,7 @@ template <class ELFT> void OutputELFWriter<ELFT>::createDefaultSections() {
// 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 OutputELFWriter<ELFT>::createDefaultSections() {
}
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

View File

@ -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);