diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2019-09-13 11:59:51 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2019-09-13 11:59:51 +0000 |
commit | 6baaa4be7831ffacc775b421dbc845d6ca6e89b8 (patch) | |
tree | df42836e13793f91ed9e722c1e91183dc3e5283e /llvm/examples | |
parent | ce74c3b19f5b60d427977f21e506c26a3f40bd7f (diff) | |
download | bcm5719-llvm-6baaa4be7831ffacc775b421dbc845d6ca6e89b8.tar.gz bcm5719-llvm-6baaa4be7831ffacc775b421dbc845d6ca6e89b8.zip |
[Orc] Roll back ThreadPool to std::function
MSVC doesn't allow move-only types in std::packaged_task. Boo.
llvm-svn: 371844
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)); |