@@ -148,19 +148,18 @@ std::atomic<uint64_t> LinkGraphMaterializationUnit::Counter{0};
148
148
namespace llvm {
149
149
namespace orc {
150
150
151
- class ObjectLinkingLayerJITLinkContext final : public JITLinkContext {
151
+ class ObjectLinkingLayer ::JITLinkCtx final : public JITLinkContext {
152
152
public:
153
- ObjectLinkingLayerJITLinkContext (
154
- ObjectLinkingLayer &Layer,
155
- std::unique_ptr<MaterializationResponsibility> MR,
156
- std::unique_ptr<MemoryBuffer> ObjBuffer)
153
+ JITLinkCtx (ObjectLinkingLayer &Layer,
154
+ std::unique_ptr<MaterializationResponsibility> MR,
155
+ std::unique_ptr<MemoryBuffer> ObjBuffer)
157
156
: JITLinkContext(&MR->getTargetJITDylib ()), Layer(Layer),
158
157
MR(std::move(MR)), ObjBuffer(std::move(ObjBuffer)) {
159
158
std::lock_guard<std::mutex> Lock (Layer.LayerMutex );
160
159
Plugins = Layer.Plugins ;
161
160
}
162
161
163
- ~ObjectLinkingLayerJITLinkContext () {
162
+ ~JITLinkCtx () {
164
163
// If there is an object buffer return function then use it to
165
164
// return ownership of the buffer.
166
165
if (Layer.ReturnObjectBuffer && ObjBuffer)
@@ -624,8 +623,7 @@ void ObjectLinkingLayer::emit(std::unique_ptr<MaterializationResponsibility> R,
624
623
assert (O && " Object must not be null" );
625
624
MemoryBufferRef ObjBuffer = O->getMemBufferRef ();
626
625
627
- auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>(
628
- *this , std::move (R), std::move (O));
626
+ auto Ctx = std::make_unique<JITLinkCtx>(*this , std::move (R), std::move (O));
629
627
if (auto G = createLinkGraphFromObject (
630
628
ObjBuffer, getExecutionSession ().getSymbolStringPool ())) {
631
629
Ctx->notifyMaterializing (**G);
@@ -637,8 +635,7 @@ void ObjectLinkingLayer::emit(std::unique_ptr<MaterializationResponsibility> R,
637
635
638
636
void ObjectLinkingLayer::emit (std::unique_ptr<MaterializationResponsibility> R,
639
637
std::unique_ptr<LinkGraph> G) {
640
- auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>(
641
- *this , std::move (R), nullptr );
638
+ auto Ctx = std::make_unique<JITLinkCtx>(*this , std::move (R), nullptr );
642
639
Ctx->notifyMaterializing (*G);
643
640
link (std::move (G), std::move (Ctx));
644
641
}
0 commit comments