[ORC] Fix SpeculativeJIT example after 7da63426ac5 (ORC dispatch unification).

Fixes the bot failure at
https://lab.llvm.org/buildbot/#/builders/272/builds/14788.

Coding my way home: 6.48551S, 128.21109W
This commit is contained in:
Lang Hames 2024-04-24 00:54:32 -08:00
parent 945eeb2d92
commit e400e908b2

View File

@ -49,7 +49,9 @@ public:
if (!DL)
return DL.takeError();
auto EPC = SelfExecutorProcessControl::Create();
auto EPC = SelfExecutorProcessControl::Create(
nullptr,
std::make_unique<DynamicThreadPoolTaskDispatcher>(std::nullopt));
if (!EPC)
return EPC.takeError();
@ -116,14 +118,6 @@ private:
std::move(ISMBuilder)) {
MainJD.addGenerator(std::move(ProcessSymbolsGenerator));
this->CODLayer.setImplMap(&Imps);
this->ES->setDispatchTask(
[this](std::unique_ptr<Task> T) {
CompileThreads.async(
[UnownedT = T.release()]() {
std::unique_ptr<Task> T(UnownedT);
T->run();
});
});
ExitOnErr(S.addSpeculationRuntime(MainJD, Mangle));
LocalCXXRuntimeOverrides CXXRuntimeoverrides;
ExitOnErr(CXXRuntimeoverrides.enable(MainJD, Mangle));