diff --git a/examples/SpeculativeJIT/SpeculativeJIT.cpp b/examples/SpeculativeJIT/SpeculativeJIT.cpp index 27e398e8bba..0ca5d62e7b6 100644 --- a/examples/SpeculativeJIT/SpeculativeJIT.cpp +++ b/examples/SpeculativeJIT/SpeculativeJIT.cpp @@ -112,14 +112,12 @@ private: std::move(ISMBuilder)) { MainJD.addGenerator(std::move(ProcessSymbolsGenerator)); this->CODLayer.setImplMap(&Imps); - this->ES->setDispatchMaterialization( - [this](std::unique_ptr MU, - std::unique_ptr MR) { + this->ES->setDispatchTask( + [this](std::unique_ptr T) { CompileThreads.async( - [UnownedMU = MU.release(), UnownedMR = MR.release()]() { - std::unique_ptr MU(UnownedMU); - std::unique_ptr MR(UnownedMR); - MU->materialize(std::move(MR)); + [UnownedT = T.release()]() { + std::unique_ptr T(UnownedT); + T->run(); }); }); ExitOnErr(S.addSpeculationRuntime(MainJD, Mangle));