13#ifndef LLVM_EXECUTIONENGINE_ORC_LAYER_H
14#define LLVM_EXECUTIONENGINE_ORC_LAYER_H
93 this->CloneToNewContextOnEmit = CloneToNewContextOnEmit;
110 virtual void emit(std::unique_ptr<MaterializationResponsibility> R,
114 bool CloneToNewContextOnEmit =
false;
128 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override;
167 virtual void emit(std::unique_ptr<MaterializationResponsibility> R,
168 std::unique_ptr<MemoryBuffer> O) = 0;
181 Create(
ObjectLayer &L, std::unique_ptr<MemoryBuffer> O);
184 std::unique_ptr<MemoryBuffer> O,
191 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override;
195 std::unique_ptr<MemoryBuffer> O;
Module.h This file contains the declarations for the Module class.
static StringRef getName(Value *V)
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Inheritance utility for extensible RTTI.
StringRef - Represent a constant reference to a string, i.e.
MaterializationUnit that materializes modules by calling the 'emit' method on the given IRLayer.
Materializes the given object file (represented by a MemoryBuffer instance) by calling 'emit' on the ...
An ExecutionSession represents a running JIT program.
Interface for layers that accept LLVM IR.
IRLayer(ExecutionSession &ES, const IRSymbolMapper::ManglingOptions *&MO)
virtual void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM)=0
Emit should materialize the given IR.
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
void setCloneToNewContextOnEmit(bool CloneToNewContextOnEmit)
Sets the CloneToNewContextOnEmit flag (false by default).
Error add(JITDylib &JD, ThreadSafeModule TSM)
Adds a MaterializationUnit representing the given IR to the given JITDylib.
const IRSymbolMapper::ManglingOptions *& getManglingOptions() const
Get the mangling options for this layer.
bool getCloneToNewContextOnEmit() const
Returns the current value of the CloneToNewContextOnEmit flag.
IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR.
SymbolNameToDefinitionMap SymbolToDefinition
const ThreadSafeModule & getModule() const
Return a reference to the contained ThreadSafeModule.
std::map< SymbolStringPtr, GlobalValue * > SymbolNameToDefinitionMap
Represents a JIT'd dynamic library.
LLVM_ABI ResourceTrackerSP getDefaultResourceTracker()
Get the default resource tracker for this JITDylib.
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group,...
Interface for Layers that accept object files.
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.
virtual void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O)=0
Emit should materialize the given IR.
ExecutionSession & getExecutionSession()
Returns the execution session for this layer.
Pointer to a pooled string representing a symbol name.
An LLVM Module together with a shared ThreadSafeContext.
This is an optimization pass for GlobalISel generic memory operations.