13#ifndef LLVM_EXECUTIONENGINE_ORC_RTDYLDOBJECTLINKINGLAYER_H
14#define LLVM_EXECUTIONENGINE_ORC_RTDYLDOBJECTLINKINGLAYER_H
37 :
public RTTIExtends<RTDyldObjectLinkingLayer, ObjectLayer>,
63 void emit(std::unique_ptr<MaterializationResponsibility> R,
64 std::unique_ptr<MemoryBuffer> O)
override;
68 this->NotifyLoaded = std::move(NotifyLoaded);
75 this->NotifyEmitted = std::move(NotifyEmitted);
86 this->ProcessAllSections = ProcessAllSections;
100 this->OverrideObjectFlags = OverrideObjectFlags;
117 this->AutoClaimObjectSymbols = AutoClaimObjectSymbols;
128 using MemoryManagerUP = std::unique_ptr<RuntimeDyld::MemoryManager>;
134 std::map<StringRef, JITEvaluatedSymbol>
Resolved,
135 std::set<StringRef> &InternalSymbols);
139 std::unique_ptr<RuntimeDyld::MemoryManager> MemMgr,
140 std::unique_ptr<RuntimeDyld::LoadedObjectInfo> LoadedObjInfo,
141 std::unique_ptr<SymbolDependenceMap> Deps,
Error Err);
147 mutable std::mutex RTDyldLayerMutex;
148 GetMemoryManagerFunction GetMemoryManager;
149 NotifyLoadedFunction NotifyLoaded;
150 NotifyEmittedFunction NotifyEmitted;
151 bool ProcessAllSections =
false;
152 bool OverrideObjectFlags =
false;
153 bool AutoClaimObjectSymbols =
false;
155 std::vector<JITEventListener *> EventListeners;
Lightweight error class with error context and mandatory checking.
JITEventListener - Abstract interface for use by the JIT to notify clients about significant events d...
This interface provides simple read-only access to a block of memory, and provides simple methods for...
Inheritance utility for extensible RTTI.
Information about the loaded object.
This class is the base class for all object file types.
An ExecutionSession represents a running JIT program.
Represents a JIT'd dynamic library.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
RTDyldObjectLinkingLayer & setNotifyLoaded(NotifyLoadedFunction NotifyLoaded)
Set the NotifyLoaded callback.
RTDyldObjectLinkingLayer & setNotifyEmitted(NotifyEmittedFunction NotifyEmitted)
Set the NotifyEmitted callback.
RTDyldObjectLinkingLayer(ExecutionSession &ES, GetMemoryManagerFunction GetMemoryManager)
Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyEmitted functors.
void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override
Emit the object.
std::function< void( MaterializationResponsibility &R, const object::ObjectFile &Obj, const RuntimeDyld::LoadedObjectInfo &)> NotifyLoadedFunction
Functor for receiving object-loaded notifications.
RTDyldObjectLinkingLayer & setAutoClaimResponsibilityForObjectSymbols(bool AutoClaimObjectSymbols)
If set, this RTDyldObjectLinkingLayer instance will claim responsibility for any symbols provided by ...
RTDyldObjectLinkingLayer & setProcessAllSections(bool ProcessAllSections)
Set the 'ProcessAllSections' flag.
RTDyldObjectLinkingLayer & setOverrideObjectFlagsWithResponsibilityFlags(bool OverrideObjectFlags)
Instructs this RTDyldLinkingLayer2 instance to override the symbol flags returned by RuntimeDyld for ...
std::function< void( MaterializationResponsibility &R, std::unique_ptr< MemoryBuffer >)> NotifyEmittedFunction
Functor for receiving finalization notifications.
unique_function< std::unique_ptr< RuntimeDyld::MemoryManager >( const MemoryBuffer &)> GetMemoryManagerFunction
Listens for ResourceTracker operations.
unique_function is a type-erasing functor similar to std::function.
@ Resolved
Queried, materialization begun.
This is an optimization pass for GlobalISel generic memory operations.