From 1a5c1ee5b8bb580ce35e660f9ea907148c6bf627 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 13 Jul 2022 15:44:08 -0400 Subject: [PATCH] [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. --- clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp index a3ff6fb..cf1a9d3 100644 --- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp +++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp @@ -1474,7 +1474,7 @@ Expected> getDeviceInput(const ArgList &Args) { if (IsTargetUsed.contains(LazyFile)) InputFiles.emplace_back(std::move(LazyFile)); - return InputFiles; + return std::move(InputFiles); } } // namespace -- 2.7.4