[clang] 1a5c1ee - [LinkerWrapper] Fix deleted constructor error on older compilers
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 12:45:42 PDT 2022
Author: Joseph Huber
Date: 2022-07-13T15:45:35-04:00
New Revision: 1a5c1ee5b8bb580ce35e660f9ea907148c6bf627
URL: https://github.com/llvm/llvm-project/commit/1a5c1ee5b8bb580ce35e660f9ea907148c6bf627
DIFF: https://github.com/llvm/llvm-project/commit/1a5c1ee5b8bb580ce35e660f9ea907148c6bf627.diff
LOG: [LinkerWrapper] Fix deleted constructor error on older compilers
Summary:
The previous patch moved some functoinality into a new function and
returned it. The vector contained move-only members. Newer compilers
should figure this out and I didn't notice any problems, but other ones
have problems. Explicitly move this vector to hopefully solve the issue.
Added:
Modified:
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
Removed:
################################################################################
diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
index a3ff6fba3748..cf1a9d39ee16 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -1474,7 +1474,7 @@ Expected<SmallVector<OffloadFile>> getDeviceInput(const ArgList &Args) {
if (IsTargetUsed.contains(LazyFile))
InputFiles.emplace_back(std::move(LazyFile));
- return InputFiles;
+ return std::move(InputFiles);
}
} // namespace
More information about the cfe-commits
mailing list