mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 23:21:04 +00:00
[ORC] Fix the type of RTDyldObjectLinkingLayer::NotifyLoadedFtor.
Bug found by Stefan Granitz. Thanks Stefan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a10cceeff4
commit
5ed9e8f1fe
@ -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)>;
|
||||
|
@ -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());
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user