diff options
3 files changed, 12 insertions, 3 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h index 633713c38ae..246c57341f3 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h @@ -99,8 +99,9 @@ public: using RTDyldObjectLinkingLayerBase::ObjectPtr; /// @brief Functor for receiving object-loaded notifications. - using NotifyLoadedFtor = std::function<void(ObjHandleT, const ObjectPtr &Obj, - const LoadedObjectInfo &)>; + using NotifyLoadedFtor = + std::function<void(ObjHandleT, const ObjectPtr &Obj, + const RuntimeDyld::LoadedObjectInfo &)>; /// @brief Functor for receiving finalization notifications. using NotifyFinalizedFtor = std::function<void(ObjHandleT)>; diff --git a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h index cb48d6cb230..1dc8d4ac7bc 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h +++ b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h @@ -341,7 +341,7 @@ private: void operator()(RTDyldObjectLinkingLayerBase::ObjHandleT H, const RTDyldObjectLinkingLayer::ObjectPtr &Obj, - const LoadedObjectInfo &Info) const { + const RuntimeDyld::LoadedObjectInfo &Info) const { M.UnfinalizedSections[H] = std::move(M.SectionsAllocatedSinceLastLoad); M.SectionsAllocatedSinceLastLoad = SectionAddrSet(); M.MemMgr->notifyObjectLoaded(&M, *Obj->getBinary()); diff --git a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp index e4b61d855c5..132681ecc19 100644 --- a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp @@ -255,4 +255,12 @@ TEST_F(RTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) { "(multiple unrelated objects loaded prior to finalization)"; } +TEST_F(RTDyldObjectLinkingLayerExecutionTest, TestNotifyLoadedSignature) { + RTDyldObjectLinkingLayer ObjLayer([]() { return nullptr; }, + [this](decltype(ObjLayer)::ObjHandleT, + const decltype(ObjLayer)::ObjectPtr &obj, + const RuntimeDyld::LoadedObjectInfo &info) { + }); +} + } // end anonymous namespace |