Remove std::move that was preventing return value optimization.

llvm-svn: 226356
This commit is contained in:
Richard Trieu 2015-01-17 00:46:44 +00:00
parent 7618b2b23d
commit 73d06526ba
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ std::unique_ptr<Module> llvm::parseAssembly(MemoryBufferRef F,
if (parseAssemblyInto(F, *M, Err))
return nullptr;
return std::move(M);
return M;
}
std::unique_ptr<Module> llvm::parseAssemblyFile(StringRef Filename,

View File

@ -1570,11 +1570,11 @@ std::string Node::getVerbatimTag() const {
if (Raw.find_last_of('!') == 0) {
Ret = Doc->getTagMap().find("!")->second;
Ret += Raw.substr(1);
return std::move(Ret);
return Ret;
} else if (Raw.startswith("!!")) {
Ret = Doc->getTagMap().find("!!")->second;
Ret += Raw.substr(2);
return std::move(Ret);
return Ret;
} else {
StringRef TagHandle = Raw.substr(0, Raw.find_last_of('!') + 1);
std::map<StringRef, StringRef>::const_iterator It =
@ -1588,7 +1588,7 @@ std::string Node::getVerbatimTag() const {
setError(Twine("Unknown tag handle ") + TagHandle, T);
}
Ret += Raw.substr(Raw.find_last_of('!') + 1);
return std::move(Ret);
return Ret;
}
}