diff options
author | Lang Hames <lhames@gmail.com> | 2024-12-16 16:54:17 +1100 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2024-12-16 16:56:33 +1100 |
commit | f420d26e9dd7ff6aed435f86e7d6768501a29741 (patch) | |
tree | bb2fd2d51598da5b4d02abcaf80f4a94c2344850 /llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp | |
parent | e4fb30205f1df5156328b234ff2a2866b7035fef (diff) | |
download | llvm-f420d26e9dd7ff6aed435f86e7d6768501a29741.zip llvm-f420d26e9dd7ff6aed435f86e7d6768501a29741.tar.gz llvm-f420d26e9dd7ff6aed435f86e7d6768501a29741.tar.bz2 |
[ORC] Make ObjectLinkingLayerJITLinkContext a private nested class.
This class is an implementation detail, so doesn't need a publicly accessible
name.
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
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<uint64_t> 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<MaterializationResponsibility> MR, - std::unique_ptr<MemoryBuffer> ObjBuffer) + JITLinkCtx(ObjectLinkingLayer &Layer, + std::unique_ptr<MaterializationResponsibility> MR, + std::unique_ptr<MemoryBuffer> ObjBuffer) : JITLinkContext(&MR->getTargetJITDylib()), Layer(Layer), MR(std::move(MR)), ObjBuffer(std::move(ObjBuffer)) { std::lock_guard<std::mutex> 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<MaterializationResponsibility> R, assert(O && "Object must not be null"); MemoryBufferRef ObjBuffer = O->getMemBufferRef(); - auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>( - *this, std::move(R), std::move(O)); + auto Ctx = std::make_unique<JITLinkCtx>(*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<MaterializationResponsibility> R, void ObjectLinkingLayer::emit(std::unique_ptr<MaterializationResponsibility> R, std::unique_ptr<LinkGraph> G) { - auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>( - *this, std::move(R), nullptr); + auto Ctx = std::make_unique<JITLinkCtx>(*this, std::move(R), nullptr); Ctx->notifyMaterializing(*G); link(std::move(G), std::move(Ctx)); } |