mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-03 18:09:29 +00: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:
parent
b3dc237fab
commit
5dd61e6f09
@ -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:
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user