[lld] r238034 - Remove redundant std::move on functions that return a unique_ptr.
Benjamin Kramer
benny.kra at GOOGLEMAIL.com
Fri May 22 10:52:05 PDT 2015
Author: d0k
Date: Fri May 22 12:52:04 2015
New Revision: 238034
URL: http://llvm.org/viewvc/llvm-project?rev=238034&view=rev
Log:
Remove redundant std::move on functions that return a unique_ptr.
Modified:
lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp
lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp?rev=238034&r1=238033&r2=238034&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp Fri May 22 12:52:04 2015
@@ -667,9 +667,9 @@ void TargetLayout<ELFT>::addExtraChunksT
template <class ELFT>
RelocationTable<ELFT> *TargetLayout<ELFT>::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<ELFT> *TargetLayout<ELFT
template <class ELFT>
RelocationTable<ELFT> *TargetLayout<ELFT>::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();
Modified: lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp?rev=238034&r1=238033&r2=238034&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp Fri May 22 12:52:04 2015
@@ -31,7 +31,7 @@ class LinkerScriptTest : public testing:
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) {
More information about the llvm-commits
mailing list