@@ -291,11 +291,14 @@ MachOPlatform::HeaderOptions::BuildVersionOpts::fromTriple(const Triple &TT,
291291 return MachOPlatform::HeaderOptions::BuildVersionOpts{Platform, MinOS, SDK};
292292}
293293
294- Expected<std::unique_ptr<MachOPlatform>> MachOPlatform::Create (
295- ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer,
296- JITDylib &PlatformJD, std::unique_ptr<DefinitionGenerator> OrcRuntime,
297- HeaderOptions PlatformJDOpts, MachOHeaderMUBuilder BuildMachOHeaderMU,
298- std::optional<SymbolAliasMap> RuntimeAliases) {
294+ Expected<std::unique_ptr<MachOPlatform>>
295+ MachOPlatform::Create (ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD,
296+ std::unique_ptr<DefinitionGenerator> OrcRuntime,
297+ HeaderOptions PlatformJDOpts,
298+ MachOHeaderMUBuilder BuildMachOHeaderMU,
299+ std::optional<SymbolAliasMap> RuntimeAliases) {
300+
301+ auto &ES = ObjLinkingLayer.getExecutionSession ();
299302
300303 // If the target is not supported then bail out immediately.
301304 if (!supportedTarget (ES.getTargetTriple ()))
@@ -334,9 +337,8 @@ Expected<std::unique_ptr<MachOPlatform>> MachOPlatform::Create(
334337}
335338
336339Expected<std::unique_ptr<MachOPlatform>>
337- MachOPlatform::Create (ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer,
338- JITDylib &PlatformJD, const char *OrcRuntimePath,
339- HeaderOptions PlatformJDOpts,
340+ MachOPlatform::Create (ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD,
341+ const char *OrcRuntimePath, HeaderOptions PlatformJDOpts,
340342 MachOHeaderMUBuilder BuildMachOHeaderMU,
341343 std::optional<SymbolAliasMap> RuntimeAliases) {
342344
@@ -346,7 +348,7 @@ MachOPlatform::Create(ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer,
346348 if (!OrcRuntimeArchiveGenerator)
347349 return OrcRuntimeArchiveGenerator.takeError ();
348350
349- return Create (ES, ObjLinkingLayer, PlatformJD,
351+ return Create (ObjLinkingLayer, PlatformJD,
350352 std::move (*OrcRuntimeArchiveGenerator),
351353 std::move (PlatformJDOpts), std::move (BuildMachOHeaderMU),
352354 std::move (RuntimeAliases));
0 commit comments