From f420d26e9dd7ff6aed435f86e7d6768501a29741 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 16 Dec 2024 16:54:17 +1100 Subject: [ORC] Make ObjectLinkingLayerJITLinkContext a private nested class. This class is an implementation detail, so doesn't need a publicly accessible name. --- llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp') diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp index dd15499..4630e62 100644 --- a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp @@ -148,19 +148,18 @@ std::atomic LinkGraphMaterializationUnit::Counter{0}; namespace llvm { namespace orc { -class ObjectLinkingLayerJITLinkContext final : public JITLinkContext { +class ObjectLinkingLayer::JITLinkCtx final : public JITLinkContext { public: - ObjectLinkingLayerJITLinkContext( - ObjectLinkingLayer &Layer, - std::unique_ptr MR, - std::unique_ptr ObjBuffer) + JITLinkCtx(ObjectLinkingLayer &Layer, + std::unique_ptr MR, + std::unique_ptr ObjBuffer) : JITLinkContext(&MR->getTargetJITDylib()), Layer(Layer), MR(std::move(MR)), ObjBuffer(std::move(ObjBuffer)) { std::lock_guard Lock(Layer.LayerMutex); Plugins = Layer.Plugins; } - ~ObjectLinkingLayerJITLinkContext() { + ~JITLinkCtx() { // If there is an object buffer return function then use it to // return ownership of the buffer. if (Layer.ReturnObjectBuffer && ObjBuffer) @@ -624,8 +623,7 @@ void ObjectLinkingLayer::emit(std::unique_ptr R, assert(O && "Object must not be null"); MemoryBufferRef ObjBuffer = O->getMemBufferRef(); - auto Ctx = std::make_unique( - *this, std::move(R), std::move(O)); + auto Ctx = std::make_unique(*this, std::move(R), std::move(O)); if (auto G = createLinkGraphFromObject( ObjBuffer, getExecutionSession().getSymbolStringPool())) { Ctx->notifyMaterializing(**G); @@ -637,8 +635,7 @@ void ObjectLinkingLayer::emit(std::unique_ptr R, void ObjectLinkingLayer::emit(std::unique_ptr R, std::unique_ptr G) { - auto Ctx = std::make_unique( - *this, std::move(R), nullptr); + auto Ctx = std::make_unique(*this, std::move(R), nullptr); Ctx->notifyMaterializing(*G); link(std::move(G), std::move(Ctx)); } -- cgit v1.1