[clang] dbb10f7 - [OpenMP] Fix deleted move constructor failing on some compiles
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 15:41:30 PDT 2022
Author: Joseph Huber
Date: 2022-04-19T18:40:15-04:00
New Revision: dbb10f7097dd357557b7b1976ff0b47c5627141b
URL: https://github.com/llvm/llvm-project/commit/dbb10f7097dd357557b7b1976ff0b47c5627141b
DIFF: https://github.com/llvm/llvm-project/commit/dbb10f7097dd357557b7b1976ff0b47c5627141b.diff
LOG: [OpenMP] Fix deleted move constructor failing on some compiles
Summary:
A previous commit added some new errors that were not correctly casted
to an r-value. This doesn't work on some compilers.
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 cc5582d74a6ff..b52dda13ac200 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -433,7 +433,7 @@ extractFromBinary(const ObjectFile &Obj,
StripArgs.push_back(TempFile);
if (Error Err = executeCommands(*StripPath, StripArgs))
- return Err;
+ return std::move(Err);
return static_cast<std::string>(TempFile);
}
@@ -634,7 +634,7 @@ Expected<std::string> assemble(StringRef InputFile, Triple TheTriple,
printCommands(CmdArgs);
if (Error Err = executeCommands(*PtxasPath, CmdArgs))
- return Err;
+ return std::move(Err);
return static_cast<std::string>(TempFile);
}
@@ -674,7 +674,7 @@ Expected<std::string> link(ArrayRef<std::string> InputFiles, Triple TheTriple,
printCommands(CmdArgs);
if (Error Err = executeCommands(*NvlinkPath, CmdArgs))
- return Err;
+ return std::move(Err);
return static_cast<std::string>(TempFile);
}
@@ -711,7 +711,7 @@ Expected<std::string> link(ArrayRef<std::string> InputFiles, Triple TheTriple,
printCommands(CmdArgs);
if (Error Err = executeCommands(*LLDPath, CmdArgs))
- return Err;
+ return std::move(Err);
return static_cast<std::string>(TempFile);
}
@@ -791,7 +791,7 @@ Expected<std::string> link(ArrayRef<std::string> InputFiles, Triple TheTriple,
printCommands(CmdArgs);
if (Error Err = executeCommands(LinkerUserPath, CmdArgs))
- return Err;
+ return std::move(Err);
return static_cast<std::string>(TempFile);
}
More information about the cfe-commits
mailing list