llvm-hs-5.1.0: General purpose LLVM bindings

LLVM.Internal.OrcJIT.CompileLayer

Synopsis

Documentation

class CompileLayer l where Source #

There are two main types of operations provided by instances of CompileLayer.

1. You can add / remove modules using addModule / removeModuleSet.
2. You can search for symbols using findSymbol / findSymbolIn in the previously added modules.

Minimal complete definition

Methods

getCleanups :: l -> IORef [IO ()] Source #

Instances

 Source # Methods Source # MethodsgetCleanups :: IRCompileLayer l -> IORef [IO ()] Source # Source # Methods

Mangle a symbol according to the data layout stored in the CompileLayer.

findSymbol :: CompileLayer l => l -> MangledSymbol -> Bool -> IO JITSymbol Source #

findSymbol layer symbol exportedSymbolsOnly searches for symbol in all modules added to layer. If exportedSymbolsOnly is True only exported symbols are searched.

findSymbolIn layer handle symbol exportedSymbolsOnly searches for symbol in the context of the module represented by handle. If exportedSymbolsOnly is True only exported symbols are searched.

Add a module to the CompileLayer. The SymbolResolver is used to resolve external symbols in the module.

Note: This function consumes the module passed to it and it must not be used after calling this method.

removeModule :: CompileLayer l => l -> ModuleHandle -> IO () Source #

bracket-style wrapper around addModule and removeModule.
Dispose of a CompileLayer. This should called when the CompileLayer is not needed anymore.
Abstract type representing a module in a CompileLayer.