@@ -329,7 +329,7 @@ MachOPlatform::Create(ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD,
329329 // Create the instance.
330330 Error Err = Error::success ();
331331 auto P = std::unique_ptr<MachOPlatform>(new MachOPlatform (
332- ES, ObjLinkingLayer, PlatformJD, std::move (OrcRuntime),
332+ ObjLinkingLayer, PlatformJD, std::move (OrcRuntime),
333333 std::move (PlatformJDOpts), std::move (BuildMachOHeaderMU), Err));
334334 if (Err)
335335 return std::move (Err);
@@ -473,12 +473,12 @@ MachOPlatform::flagsForSymbol(jitlink::Symbol &Sym) {
473473}
474474
475475MachOPlatform::MachOPlatform (
476- ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer,
477- JITDylib &PlatformJD,
476+ ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD,
478477 std::unique_ptr<DefinitionGenerator> OrcRuntimeGenerator,
479478 HeaderOptions PlatformJDOpts, MachOHeaderMUBuilder BuildMachOHeaderMU,
480479 Error &Err)
481- : ES(ES), PlatformJD(PlatformJD), ObjLinkingLayer(ObjLinkingLayer),
480+ : ES(ObjLinkingLayer.getExecutionSession()), PlatformJD(PlatformJD),
481+ ObjLinkingLayer (ObjLinkingLayer),
482482 BuildMachOHeaderMU(std::move(BuildMachOHeaderMU)) {
483483 ErrorAsOutParameter _ (&Err);
484484 ObjLinkingLayer.addPlugin (std::make_unique<MachOPlatformPlugin>(*this ));
0 commit comments