summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2019-09-13 11:59:51 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2019-09-13 11:59:51 +0000
commit6baaa4be7831ffacc775b421dbc845d6ca6e89b8 (patch)
treedf42836e13793f91ed9e722c1e91183dc3e5283e /llvm/examples
parentce74c3b19f5b60d427977f21e506c26a3f40bd7f (diff)
downloadbcm5719-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.cpp4
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));
OpenPOWER on IntegriCloud