[lld] r193883 - Remove redundant std::move().
Rui Ueyama
ruiu at google.com
Fri Nov 1 13:40:33 PDT 2013
Author: ruiu
Date: Fri Nov 1 15:40:33 2013
New Revision: 193883
URL: http://llvm.org/viewvc/llvm-project?rev=193883&view=rev
Log:
Remove redundant std::move().
Modified:
lld/trunk/lib/Driver/WinLinkDriver.cpp
lld/trunk/lib/Passes/LayoutPass.cpp
lld/trunk/lib/ReaderWriter/PECOFF/Atoms.h
lld/trunk/lib/ReaderWriter/PECOFF/GroupedSectionsPass.h
lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h
lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=193883&r1=193882&r2=193883&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Fri Nov 1 15:40:33 2013
@@ -93,7 +93,7 @@ std::vector<StringRef> splitPathList(Str
llvm::tie(path, str) = str.split(';');
ret.push_back(path);
}
- return std::move(ret);
+ return ret;
}
// Parse an argument for /base, /stack or /heap. The expected string
@@ -235,7 +235,7 @@ std::string createManifestXml(PECOFFLink
}
out << "</assembly>\n";
out.flush();
- return std::move(ret);
+ return ret;
}
// Convert one doublequote to two doublequotes, so that we can embed the string
@@ -418,7 +418,7 @@ std::vector<const char *> processLinkEnv
for (int i = 1; i < argc; ++i)
ret.push_back(argv[i]);
ret.push_back(nullptr);
- return std::move(ret);
+ return ret;
}
// Process "LIB" environment variable. The variable contains a list of search
Modified: lld/trunk/lib/Passes/LayoutPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=193883&r1=193882&r2=193883&view=diff
==============================================================================
--- lld/trunk/lib/Passes/LayoutPass.cpp (original)
+++ lld/trunk/lib/Passes/LayoutPass.cpp Fri Nov 1 15:40:33 2013
@@ -25,7 +25,7 @@ namespace {
std::string formatReason(StringRef reason, int leftVal, int rightVal) {
Twine msg =
Twine(reason) + " (" + Twine(leftVal) + ", " + Twine(rightVal) + ")";
- return std::move(msg.str());
+ return msg.str();
}
} // end anonymous namespace
Modified: lld/trunk/lib/ReaderWriter/PECOFF/Atoms.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/Atoms.h?rev=193883&r1=193882&r2=193883&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/Atoms.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/Atoms.h Fri Nov 1 15:40:33 2013
@@ -294,7 +294,7 @@ private:
std::string addImpPrefix(StringRef symbolName) {
std::string ret("__imp_");
ret.append(symbolName);
- return std::move(ret);
+ return ret;
}
const File &_file;
Modified: lld/trunk/lib/ReaderWriter/PECOFF/GroupedSectionsPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/GroupedSectionsPass.h?rev=193883&r1=193882&r2=193883&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/GroupedSectionsPass.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/GroupedSectionsPass.h Fri Nov 1 15:40:33 2013
@@ -80,7 +80,7 @@ private:
if (coffAtom && coffAtom->ordinal() == 0)
result[coffAtom->getSectionName()].push_back(coffAtom);
}
- return std::move(result);
+ return result;
}
/// Group atoms that needs to be merged. Returned atoms are sorted by section
@@ -105,7 +105,7 @@ private:
std::vector<std::vector<COFFDefinedAtom *>> vec;
for (auto &i : res)
vec.push_back(std::move(i.second));
- return std::move(vec);
+ return vec;
}
/// For each pair of atoms in the given vector, add a layout edge from the
Modified: lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h?rev=193883&r1=193882&r2=193883&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h Fri Nov 1 15:40:33 2013
@@ -104,7 +104,7 @@ private:
vector<uint8_t> ret(name.size() + 1);
memcpy(&ret[0], name.data(), name.size());
ret[name.size()] = 0;
- return std::move(ret);
+ return ret;
}
};
@@ -286,7 +286,7 @@ private:
COFFSharedLibraryAtom *atom = i.second;
ret[atom->loadName()].push_back(atom);
}
- return std::move(ret);
+ return ret;
}
void createImportDirectory(Context &context, StringRef loadName,
Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=193883&r1=193882&r2=193883&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Fri Nov 1 15:40:33 2013
@@ -754,7 +754,7 @@ private:
for (auto &cp : chunks)
if (SectionChunk *chunk = dyn_cast<SectionChunk>(&*cp))
chunk->addBaseRelocations(ret);
- return std::move(ret);
+ return ret;
}
// Divide the given RVAs into blocks.
@@ -763,7 +763,7 @@ private:
uint64_t mask = static_cast<uint64_t>(PAGE_SIZE) - 1;
for (uint64_t addr : relocSites)
blocks[addr & ~mask].push_back(addr & mask);
- return std::move(blocks);
+ return blocks;
}
// Create the content of a relocation block.
More information about the llvm-commits
mailing list