From 575b51688a099a8c9082dd0bd9863a2ae78e09d7 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 10 May 2021 09:20:59 -0700 Subject: [PATCH] [ORC] Update SpeculativeJIT example for dispatchTask changes in 5344c88dcb2. --- examples/SpeculativeJIT/SpeculativeJIT.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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));