diff options
Diffstat (limited to 'llvm/examples')
-rw-r--r-- | llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp index 647413cc9c2..1fd1fc92a73 100644 --- a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp +++ b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp @@ -114,7 +114,9 @@ private: this->ES->setDispatchMaterialization( [this](JITDylib &JD, std::unique_ptr<MaterializationUnit> MU) { - auto Work = [MU = std::move(MU), &JD] { MU->doMaterialize(JD); }; + // FIXME: Switch to move capture once we have C++14. + auto SharedMU = std::shared_ptr<MaterializationUnit>(std::move(MU)); + auto Work = [SharedMU, &JD]() { SharedMU->doMaterialize(JD); }; CompileThreads.async(std::move(Work)); }); ExitOnErr(S.addSpeculationRuntime(this->ES->getMainJITDylib(), Mangle)); |