14 #ifndef LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H 15 #define LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H 37 class EHFrameRegistrar;
46 class ObjectLinkingLayerJITLinkContext;
77 std::function<void(std::unique_ptr<MemoryBuffer>)>;
82 std::unique_ptr<jitlink::JITLinkMemoryManager> MemMgr);
91 this->ReturnObjectBuffer = std::move(ReturnObjectBuffer);
96 std::lock_guard<std::mutex>
Lock(LayerMutex);
97 Plugins.push_back(std::move(P));
103 std::unique_ptr<MemoryBuffer>
O)
override;
115 this->OverrideObjectFlags = OverrideObjectFlags;
132 this->AutoClaimObjectSymbols = AutoClaimObjectSymbols;
137 using AllocPtr = std::unique_ptr<jitlink::JITLinkMemoryManager::Allocation>;
145 Error removeAllModules();
147 mutable std::mutex LayerMutex;
148 std::unique_ptr<jitlink::JITLinkMemoryManager> MemMgr;
149 bool OverrideObjectFlags =
false;
150 bool AutoClaimObjectSymbols =
false;
153 std::vector<AllocPtr> UntrackedAllocs;
154 std::vector<std::unique_ptr<Plugin>>
Plugins;
164 Error notifyRemovingAllModules()
override;
168 struct EHFrameRange {
176 std::vector<EHFrameRange> UntrackedEHFrameRanges;
182 #endif // LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H
This class represents lattice values for constants.
std::function< void(std::unique_ptr< MemoryBuffer >)> ReturnObjectBufferFunction
Plugin instances can be added to the ObjectLinkingLayer to receive callbacks when code is loaded or e...
virtual Error notifyEmitted(MaterializationResponsibility &MR)
ObjectLinkingLayer & setOverrideObjectFlagsWithResponsibilityFlags(bool OverrideObjectFlags)
Instructs this ObjectLinkingLayer instance to override the symbol flags found in the AtomGraph with t...
An ObjectLayer implementation built on JITLink.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
void setReturnObjectBuffer(ReturnObjectBufferFunction ReturnObjectBuffer)
Set an object buffer return function.
uint64_t JITTargetAddress
Represents an address in the target process's address space.
Supports registration/deregistration of EH-frames in a target process.
virtual void notifyLoaded(MaterializationResponsibility &MR)
static ManagedStatic< std::vector< std::string > > Plugins
Triple - Helper class for working with autoconf configuration names.
static ErrorSuccess success()
Create a success value.
An ExecutionSession represents a running JIT program.
virtual Error notifyRemovingAllModules()
uint8_t uint64_t VModuleKey
VModuleKey provides a unique identifier (allocated and managed by ExecutionSessions) for a module add...
ObjectLinkingLayer & addPlugin(std::unique_ptr< Plugin > P)
Add a pass-config modifier.
virtual void modifyPassConfig(MaterializationResponsibility &MR, const Triple &TT, jitlink::PassConfiguration &Config)
An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes...
virtual Error notifyRemovingModule(VModuleKey K)
ObjectLinkingLayer & setAutoClaimResponsibilityForObjectSymbols(bool AutoClaimObjectSymbols)
If set, this ObjectLinkingLayer instance will claim responsibility for any symbols provided by a give...
Lightweight error class with error context and mandatory checking.
Interface for Layers that accept object files.