[clang] 86bfab2 - [OffloadPackager] Resolve copy elision warnings
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 23 08:02:14 PDT 2022
Author: Joseph Huber
Date: 2022-08-23T10:01:54-05:00
New Revision: 86bfab2723618772f5c4ffc2a68eedca592c6928
URL: https://github.com/llvm/llvm-project/commit/86bfab2723618772f5c4ffc2a68eedca592c6928
DIFF: https://github.com/llvm/llvm-project/commit/86bfab2723618772f5c4ffc2a68eedca592c6928.diff
LOG: [OffloadPackager] Resolve copy elision warnings
Summary:
The buildbots are giving failures on the explicit move operations here.
Previously I had problems where not perfomring an explicit move would
cause problems with older compilers so we'll see if this works as
expected.
Added:
Modified:
clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
Removed:
################################################################################
diff --git a/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp b/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
index b8d1565689f8..c9c722e0a5b5 100644
--- a/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
+++ b/clang/tools/clang-offload-packager/ClangOffloadPackager.cpp
@@ -119,7 +119,7 @@ static Error bundleImages() {
std::unique_ptr<FileOutputBuffer> Output = std::move(*OutputOrErr);
std::copy(BinaryData.begin(), BinaryData.end(), Output->getBufferStart());
if (Error E = Output->commit())
- return std::move(E);
+ return E;
return Error::success();
}
@@ -200,7 +200,7 @@ static Error unbundleImages() {
std::unique_ptr<FileOutputBuffer> Output = std::move(*OutputOrErr);
llvm::copy(Binary->getImage(), Output->getBufferStart());
if (Error E = Output->commit())
- return std::move(E);
+ return E;
}
}
More information about the cfe-commits
mailing list