llvm.org GIT mirror llvm / 6cf3f3f
Remove std::move that was preventing return value optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226356 91177308-0d34-0410-b5e6-96231b3b80d8 Richard Trieu 5 years ago
2 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
3737 if (parseAssemblyInto(F, *M, Err))
3838 return nullptr;
3939
40 return std::move(M);
40 return M;
4141 }
4242
4343 std::unique_ptr llvm::parseAssemblyFile(StringRef Filename,
15691569 if (Raw.find_last_of('!') == 0) {
15701570 Ret = Doc->getTagMap().find("!")->second;
15711571 Ret += Raw.substr(1);
1572 return std::move(Ret);
1572 return Ret;
15731573 } else if (Raw.startswith("!!")) {
15741574 Ret = Doc->getTagMap().find("!!")->second;
15751575 Ret += Raw.substr(2);
1576 return std::move(Ret);
1576 return Ret;
15771577 } else {
15781578 StringRef TagHandle = Raw.substr(0, Raw.find_last_of('!') + 1);
15791579 std::map::const_iterator It =
15871587 setError(Twine("Unknown tag handle ") + TagHandle, T);
15881588 }
15891589 Ret += Raw.substr(Raw.find_last_of('!') + 1);
1590 return std::move(Ret);
1590 return Ret;
15911591 }
15921592 }
15931593