From ebcc0dcad1c148f603f3746afa3f00a9caefbc56 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 22 May 2015 17:52:04 +0000 Subject: [PATCH] Remove redundant std::move on functions that return a unique_ptr. llvm-svn: 238034 --- lld/lib/ReaderWriter/ELF/TargetLayout.cpp | 8 ++++---- lld/unittests/DriverTests/GnuLdDriverTest.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lld/lib/ReaderWriter/ELF/TargetLayout.cpp b/lld/lib/ReaderWriter/ELF/TargetLayout.cpp index bd2cf8fef8bc..05c6dc8aa6cd 100644 --- a/lld/lib/ReaderWriter/ELF/TargetLayout.cpp +++ b/lld/lib/ReaderWriter/ELF/TargetLayout.cpp @@ -667,9 +667,9 @@ void TargetLayout::addExtraChunksToSegment(Segment *segment, template RelocationTable *TargetLayout::getDynamicRelocationTable() { if (!_dynamicRelocationTable) { - _dynamicRelocationTable = std::move(createRelocationTable( + _dynamicRelocationTable = createRelocationTable( _ctx.isRelaOutputFormat() ? ".rela.dyn" : ".rel.dyn", - ORDER_DYNAMIC_RELOCS)); + ORDER_DYNAMIC_RELOCS); addSection(_dynamicRelocationTable.get()); } return _dynamicRelocationTable.get(); @@ -678,9 +678,9 @@ RelocationTable *TargetLayout::getDynamicRelocationTable() { template RelocationTable *TargetLayout::getPLTRelocationTable() { if (!_pltRelocationTable) { - _pltRelocationTable = std::move(createRelocationTable( + _pltRelocationTable = createRelocationTable( _ctx.isRelaOutputFormat() ? ".rela.plt" : ".rel.plt", - ORDER_DYNAMIC_PLT_RELOCS)); + ORDER_DYNAMIC_PLT_RELOCS); addSection(_pltRelocationTable.get()); } return _pltRelocationTable.get(); diff --git a/lld/unittests/DriverTests/GnuLdDriverTest.cpp b/lld/unittests/DriverTests/GnuLdDriverTest.cpp index 92eb920f0180..db8a48d4a348 100644 --- a/lld/unittests/DriverTests/GnuLdDriverTest.cpp +++ b/lld/unittests/DriverTests/GnuLdDriverTest.cpp @@ -31,7 +31,7 @@ class LinkerScriptTest : public testing::Test { protected: void SetUp() override { llvm::Triple triple(llvm::sys::getDefaultTargetTriple()); - _ctx = std::move(GnuLdDriver::createELFLinkingContext(triple)); + _ctx = GnuLdDriver::createELFLinkingContext(triple); } void parse(StringRef script, bool nostdlib = false) {