LLVM 22.0.0git
llvm::orc::RTDyldObjectLinkingLayer Class Reference

#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h"

Inheritance diagram for llvm::orc::RTDyldObjectLinkingLayer:
[legend]

Public Types

using NotifyLoadedFunction
 Functor for receiving object-loaded notifications.
using NotifyEmittedFunction
 Functor for receiving finalization notifications.
using GetMemoryManagerFunction

Public Member Functions

 RTDyldObjectLinkingLayer (ExecutionSession &ES, GetMemoryManagerFunction GetMemoryManager)
 Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyEmitted functors.
 ~RTDyldObjectLinkingLayer ()
void emit (std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override
 Emit the object.
RTDyldObjectLinkingLayersetNotifyLoaded (NotifyLoadedFunction NotifyLoaded)
 Set the NotifyLoaded callback.
RTDyldObjectLinkingLayersetNotifyEmitted (NotifyEmittedFunction NotifyEmitted)
 Set the NotifyEmitted callback.
RTDyldObjectLinkingLayersetProcessAllSections (bool ProcessAllSections)
 Set the 'ProcessAllSections' flag.
RTDyldObjectLinkingLayersetOverrideObjectFlagsWithResponsibilityFlags (bool OverrideObjectFlags)
 Instructs this RTDyldLinkingLayer2 instance to override the symbol flags returned by RuntimeDyld for any given object file with the flags supplied by the MaterializationResponsibility instance.
RTDyldObjectLinkingLayersetAutoClaimResponsibilityForObjectSymbols (bool AutoClaimObjectSymbols)
 If set, this RTDyldObjectLinkingLayer instance will claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance.
void registerJITEventListener (JITEventListener &L)
 Register a JITEventListener.
void unregisterJITEventListener (JITEventListener &L)
 Unregister a JITEventListener.
Public Member Functions inherited from llvm::RTTIExtends< RTDyldObjectLinkingLayer, ObjectLayer >
const void * dynamicClassID () const override
bool isA () const
 Check whether this instance is a subclass of QueryT.

Static Public Attributes

static char ID

Additional Inherited Members

Static Public Member Functions inherited from llvm::RTTIExtends< RTDyldObjectLinkingLayer, ObjectLayer >
static const void * classID ()
static bool classof (const T *R)

Detailed Description

Definition at line 37 of file RTDyldObjectLinkingLayer.h.

Member Typedef Documentation

◆ GetMemoryManagerFunction

Initial value:
const MemoryBuffer &)>
This interface provides simple read-only access to a block of memory, and provides simple methods for...
unique_function is a type-erasing functor similar to std::function.

Definition at line 52 of file RTDyldObjectLinkingLayer.h.

◆ NotifyEmittedFunction

Initial value:
std::function<void(
MaterializationResponsibility &R, std::unique_ptr<MemoryBuffer>)>
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition Core.h:576

Functor for receiving finalization notifications.

Definition at line 49 of file RTDyldObjectLinkingLayer.h.

◆ NotifyLoadedFunction

Initial value:
std::function<void(
Information about the loaded object.
Definition RuntimeDyld.h:70
This class is the base class for all object file types.
Definition ObjectFile.h:231

Functor for receiving object-loaded notifications.

Definition at line 44 of file RTDyldObjectLinkingLayer.h.

Constructor & Destructor Documentation

◆ RTDyldObjectLinkingLayer()

llvm::orc::RTDyldObjectLinkingLayer::RTDyldObjectLinkingLayer ( ExecutionSession & ES,
GetMemoryManagerFunction GetMemoryManager )

Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyEmitted functors.

Definition at line 85 of file RTDyldObjectLinkingLayer.cpp.

References llvm::move(), and llvm::orc::ExecutionSession::registerResourceManager().

Referenced by setNotifyLoaded(), and setProcessAllSections().

◆ ~RTDyldObjectLinkingLayer()

llvm::orc::RTDyldObjectLinkingLayer::~RTDyldObjectLinkingLayer ( )

Definition at line 91 of file RTDyldObjectLinkingLayer.cpp.

References assert().

Member Function Documentation

◆ emit()

◆ registerJITEventListener()

void llvm::orc::RTDyldObjectLinkingLayer::registerJITEventListener ( JITEventListener & L)

◆ setAutoClaimResponsibilityForObjectSymbols()

RTDyldObjectLinkingLayer & llvm::orc::RTDyldObjectLinkingLayer::setAutoClaimResponsibilityForObjectSymbols ( bool AutoClaimObjectSymbols)
inline

If set, this RTDyldObjectLinkingLayer instance will claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance.

Setting this flag allows higher-level program representations (e.g. LLVM IR) to be added based on only a subset of the symbols they provide, without having to write intervening layers to scan and add the additional symbols. This trades diagnostic quality for convenience however: If all symbols are enumerated up-front then clashes can be detected and reported early (and usually deterministically). If this option is set, clashes for the additional symbols may not be detected until late, and detection may depend on the flow of control through JIT'd code. Use with care.

Definition at line 117 of file RTDyldObjectLinkingLayer.h.

◆ setNotifyEmitted()

RTDyldObjectLinkingLayer & llvm::orc::RTDyldObjectLinkingLayer::setNotifyEmitted ( NotifyEmittedFunction NotifyEmitted)
inline

Set the NotifyEmitted callback.

Definition at line 75 of file RTDyldObjectLinkingLayer.h.

◆ setNotifyLoaded()

RTDyldObjectLinkingLayer & llvm::orc::RTDyldObjectLinkingLayer::setNotifyLoaded ( NotifyLoadedFunction NotifyLoaded)
inline

Set the NotifyLoaded callback.

Definition at line 68 of file RTDyldObjectLinkingLayer.h.

References RTDyldObjectLinkingLayer().

◆ setOverrideObjectFlagsWithResponsibilityFlags()

RTDyldObjectLinkingLayer & llvm::orc::RTDyldObjectLinkingLayer::setOverrideObjectFlagsWithResponsibilityFlags ( bool OverrideObjectFlags)
inline

Instructs this RTDyldLinkingLayer2 instance to override the symbol flags returned by RuntimeDyld for any given object file with the flags supplied by the MaterializationResponsibility instance.

This is a workaround to support symbol visibility in COFF, which does not use the libObject's SF_Exported flag. Use only when generating / adding COFF object files.

FIXME: We should be able to remove this if/when COFF properly tracks exported symbols.

Definition at line 100 of file RTDyldObjectLinkingLayer.h.

◆ setProcessAllSections()

RTDyldObjectLinkingLayer & llvm::orc::RTDyldObjectLinkingLayer::setProcessAllSections ( bool ProcessAllSections)
inline

Set the 'ProcessAllSections' flag.

If set to true, all sections in each object file will be allocated using the memory manager, rather than just the sections required for execution.

This is kludgy, and may be removed in the future.

Definition at line 86 of file RTDyldObjectLinkingLayer.h.

References RTDyldObjectLinkingLayer().

◆ unregisterJITEventListener()

void llvm::orc::RTDyldObjectLinkingLayer::unregisterJITEventListener ( JITEventListener & L)

Unregister a JITEventListener.

Definition at line 224 of file RTDyldObjectLinkingLayer.cpp.

References assert(), llvm::find(), and I.

Member Data Documentation

◆ ID

char llvm::orc::RTDyldObjectLinkingLayer::ID
static

Definition at line 41 of file RTDyldObjectLinkingLayer.h.


The documentation for this class was generated from the following files: