[llvm] r314436 - [ORC] Fix the type of RTDyldObjectLinkingLayer::NotifyLoadedFtor.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 10:43:07 PDT 2017


Author: lhames
Date: Thu Sep 28 10:43:07 2017
New Revision: 314436

URL: http://llvm.org/viewvc/llvm-project?rev=314436&view=rev
Log:
[ORC] Fix the type of RTDyldObjectLinkingLayer::NotifyLoadedFtor.

Bug found by Stefan Granitz. Thanks Stefan!



Modified:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
    llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
    llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h?rev=314436&r1=314435&r2=314436&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h Thu Sep 28 10:43:07 2017
@@ -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)>;

Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=314436&r1=314435&r2=314436&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h Thu Sep 28 10:43:07 2017
@@ -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());

Modified: llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp?rev=314436&r1=314435&r2=314436&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp Thu Sep 28 10:43:07 2017
@@ -255,4 +255,12 @@ TEST_F(RTDyldObjectLinkingLayerExecution
          "(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




More information about the llvm-commits mailing list