aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2020-02-10 07:06:45 -0800
committerBill Wendling <isanbard@gmail.com>2020-02-10 07:07:40 -0800
commitc55cf4afa9161bb4413b7ca9933d553327f5f069 (patch)
treee4917b94d3e0be14dc470fb2a5d417f2f75acca6 /llvm/lib/ProfileData/SampleProfReader.cpp
parent5ad62d3b7f7e75df776a4524bda0c9a1a9952a4e (diff)
downloadllvm-c55cf4afa9161bb4413b7ca9933d553327f5f069.zip
llvm-c55cf4afa9161bb4413b7ca9933d553327f5f069.tar.gz
llvm-c55cf4afa9161bb4413b7ca9933d553327f5f069.tar.bz2
Revert "Remove redundant "std::move"s in return statements"
The build failed with error: call to deleted constructor of 'llvm::Error' errors. This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 5a67393..6f74cec 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -1250,7 +1250,7 @@ setupMemoryBuffer(const Twine &Filename) {
if (uint64_t(Buffer->getBufferSize()) > std::numeric_limits<uint32_t>::max())
return sampleprof_error::too_large;
- return Buffer;
+ return std::move(Buffer);
}
/// Create a sample profile reader based on the format of the input file.
@@ -1362,7 +1362,7 @@ SampleProfileReader::create(std::unique_ptr<MemoryBuffer> &B, LLVMContext &C,
return EC;
}
- return Reader;
+ return std::move(Reader);
}
// For text and GCC file formats, we compute the summary after reading the