diff options
author | Lang Hames <lhames@gmail.com> | 2024-10-09 14:22:24 +1100 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2024-10-09 16:55:21 +1100 |
commit | 3dba4ca155e0b460ca82917b25d3624eb5825940 (patch) | |
tree | 552da65be3f2eb3af58c28287a1804bdb19bc435 /llvm | |
parent | c198f775cdcd731f68fb482c223702c7273d41ca (diff) | |
download | llvm-3dba4ca155e0b460ca82917b25d3624eb5825940.zip llvm-3dba4ca155e0b460ca82917b25d3624eb5825940.tar.gz llvm-3dba4ca155e0b460ca82917b25d3624eb5825940.tar.bz2 |
[ORC][MachO] Remove the ExecutionSession& argument to MachOPlatform constructor.
We can get a reference to the ExecutionSession from the ObjectLinkingLayer
argument, so there's no need to pass it in separately.
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h | 3 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h b/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h index 565f5ae..19f935d 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h @@ -292,8 +292,7 @@ private: static MachOExecutorSymbolFlags flagsForSymbol(jitlink::Symbol &Sym); - MachOPlatform(ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer, - JITDylib &PlatformJD, + MachOPlatform(ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, std::unique_ptr<DefinitionGenerator> OrcRuntimeGenerator, HeaderOptions PlatformJDOpts, MachOHeaderMUBuilder BuildMachOHeaderMU, Error &Err); diff --git a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp index f728323..e560905 100644 --- a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp +++ b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp @@ -329,7 +329,7 @@ MachOPlatform::Create(ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, // Create the instance. Error Err = Error::success(); auto P = std::unique_ptr<MachOPlatform>(new MachOPlatform( - ES, ObjLinkingLayer, PlatformJD, std::move(OrcRuntime), + ObjLinkingLayer, PlatformJD, std::move(OrcRuntime), std::move(PlatformJDOpts), std::move(BuildMachOHeaderMU), Err)); if (Err) return std::move(Err); @@ -473,12 +473,12 @@ MachOPlatform::flagsForSymbol(jitlink::Symbol &Sym) { } MachOPlatform::MachOPlatform( - ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer, - JITDylib &PlatformJD, + ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, std::unique_ptr<DefinitionGenerator> OrcRuntimeGenerator, HeaderOptions PlatformJDOpts, MachOHeaderMUBuilder BuildMachOHeaderMU, Error &Err) - : ES(ES), PlatformJD(PlatformJD), ObjLinkingLayer(ObjLinkingLayer), + : ES(ObjLinkingLayer.getExecutionSession()), PlatformJD(PlatformJD), + ObjLinkingLayer(ObjLinkingLayer), BuildMachOHeaderMU(std::move(BuildMachOHeaderMU)) { ErrorAsOutParameter _(&Err); ObjLinkingLayer.addPlugin(std::make_unique<MachOPlatformPlugin>(*this)); |