[LinkerWrapper] Fix deleted constructor error on older compilers
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 13 Jul 2022 19:44:08 +0000 (15:44 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 13 Jul 2022 19:45:35 +0000 (15:45 -0400)
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

index a3ff6fb..cf1a9d3 100644 (file)
@@ -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