aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h3
-rw-r--r--llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp8
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));