1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[ORC] Fix the type of RTDyldObjectLinkingLayer::NotifyLoadedFtor.

Bug found by Stefan Granitz. Thanks Stefan!

llvm-svn: 314436
This commit is contained in:
Lang Hames 2017-09-28 17:43:07 +00:00
parent aac52b0c56
commit fdd0433d80
3 changed files with 12 additions and 3 deletions

View File

@ -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)>;

View File

@ -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());

View File

@ -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