LLVM 20.0.0git
Public Member Functions | Static Public Attributes | List of all members
llvm::orc::ObjectLayer Class Referenceabstract

Interface for Layers that accept object files. More...

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

Inheritance diagram for llvm::orc::ObjectLayer:
Inheritance graph
[legend]

Public Member Functions

 ObjectLayer (ExecutionSession &ES)
 
virtual ~ObjectLayer ()
 
ExecutionSessiongetExecutionSession ()
 Returns the execution session for this layer.
 
virtual Error add (ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I)
 Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the given ResourceTracker.
 
Error add (ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > O)
 Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the given ResourceTracker.
 
Error add (JITDylib &JD, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I)
 Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib.
 
Error add (JITDylib &JD, std::unique_ptr< MemoryBuffer > O)
 Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib.
 
virtual void emit (std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O)=0
 Emit should materialize the given IR.
 
- Public Member Functions inherited from llvm::RTTIExtends< ObjectLayer, RTTIRoot >
const void * dynamicClassID () const override
 
bool isA (const void *const ClassID) const override
 
- Public Member Functions inherited from llvm::RTTIRoot
virtual ~RTTIRoot ()=default
 
virtual const void * dynamicClassID () const =0
 Returns the class ID for the dynamic type of this RTTIRoot instance.
 
virtual bool isA (const void *const ClassID) const
 Returns true if this class's ID matches the given class ID.
 
template<typename QueryT >
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< ObjectLayer, RTTIRoot >
static const void * classID ()
 
static bool classof (const RTTIRoot *R)
 
- Static Public Member Functions inherited from llvm::RTTIRoot
static const void * classID ()
 Returns the class ID for this type.
 

Detailed Description

Interface for Layers that accept object files.

Definition at line 133 of file Layer.h.

Constructor & Destructor Documentation

◆ ObjectLayer()

ObjectLayer::ObjectLayer ( ExecutionSession ES)

Definition at line 166 of file Layer.cpp.

◆ ~ObjectLayer()

ObjectLayer::~ObjectLayer ( )
virtualdefault

Member Function Documentation

◆ add() [1/4]

Error ObjectLayer::add ( JITDylib JD,
std::unique_ptr< MemoryBuffer O 
)

Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib.

The interface for the object will be built using the default object interface builder.

Definition at line 186 of file Layer.cpp.

References add(), getExecutionSession(), llvm::orc::getObjectFileInterface(), and I.

◆ add() [2/4]

Error llvm::orc::ObjectLayer::add ( JITDylib JD,
std::unique_ptr< MemoryBuffer O,
MaterializationUnit::Interface  I 
)
inline

Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib.

Definition at line 155 of file Layer.h.

References add(), llvm::orc::JITDylib::getDefaultResourceTracker(), and I.

◆ add() [3/4]

Error ObjectLayer::add ( ResourceTrackerSP  RT,
std::unique_ptr< MemoryBuffer O 
)

Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the given ResourceTracker.

The interface for the object will be built using the default object interface builder.

Definition at line 179 of file Layer.cpp.

References add(), getExecutionSession(), llvm::orc::getObjectFileInterface(), and I.

◆ add() [4/4]

Error ObjectLayer::add ( ResourceTrackerSP  RT,
std::unique_ptr< MemoryBuffer O,
MaterializationUnit::Interface  I 
)
virtual

Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the given ResourceTracker.

Definition at line 170 of file Layer.cpp.

References assert(), llvm::orc::JITDylib::define(), and I.

Referenced by add(), and llvm::orc::StaticLibraryDefinitionGenerator::tryToGenerate().

◆ emit()

virtual void llvm::orc::ObjectLayer::emit ( std::unique_ptr< MaterializationResponsibility R,
std::unique_ptr< MemoryBuffer O 
)
pure virtual

Emit should materialize the given IR.

Referenced by llvm::orc::ObjectTransformLayer::emit(), and llvm::orc::IRCompileLayer::emit().

◆ getExecutionSession()

ExecutionSession & llvm::orc::ObjectLayer::getExecutionSession ( )
inline

Returns the execution session for this layer.

Definition at line 141 of file Layer.h.

Referenced by add(), and llvm::orc::StaticLibraryDefinitionGenerator::tryToGenerate().

Member Data Documentation

◆ ID

char ObjectLayer::ID
static

Definition at line 135 of file Layer.h.


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