From 6cf3f3fceb4ecc0e9ea2eef26b1ed13ef2b761d3 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Sat, 17 Jan 2015 00:46:44 +0000 Subject: [PATCH] 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 --- lib/AsmParser/Parser.cpp | 2 +- lib/Support/YAMLParser.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/AsmParser/Parser.cpp b/lib/AsmParser/Parser.cpp index 08159075ff6..ed1a7539852 100644 --- a/lib/AsmParser/Parser.cpp +++ b/lib/AsmParser/Parser.cpp @@ -38,7 +38,7 @@ std::unique_ptr llvm::parseAssembly(MemoryBufferRef F, if (parseAssemblyInto(F, *M, Err)) return nullptr; - return std::move(M); + return M; } std::unique_ptr llvm::parseAssemblyFile(StringRef Filename, diff --git a/lib/Support/YAMLParser.cpp b/lib/Support/YAMLParser.cpp index 4688ff173df..b8b50dde5d6 100644 --- a/lib/Support/YAMLParser.cpp +++ b/lib/Support/YAMLParser.cpp @@ -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::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; } }