1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Fix build with gcc 7.5 by adding a "redundant move"

The constructor of Expected<T> expects as T&&, but gcc-7.5 does not
infer an rvalue in this context apparently.
This commit is contained in:
Mehdi Amini 2020-03-18 13:36:17 +00:00
parent b3dc237fab
commit 5dd61e6f09
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ int main(int argc, char *argv[]) {
[](ThreadSafeModule TSM,
const MaterializationResponsibility &R) -> Expected<ThreadSafeModule> {
TSM.withModuleDo([](Module &M) { dbgs() << "---Compiling---\n" << M; });
return TSM;
return std::move(TSM); // Not a redundant move: fix build on gcc-7.5
});
// (3) Create stubs and call-through managers:

View File

@ -191,7 +191,7 @@ Expected<ThreadSafeModule> ThinLtoJIT::setupMainModule(StringRef MainFunction) {
}
if (auto TSM = GlobalIndex->parseModuleFromFile(*M))
return TSM;
return std::move(TSM); // Not a redundant move: fix build on gcc-7.5
return createStringError(inconvertibleErrorCode(),
"Failed to parse main module");