llvm-hs-4.2.0: General purpose LLVM bindings

Safe HaskellNone
LanguageHaskell98

LLVM.Internal.OrcJIT.CompileLayer

Synopsis

Documentation

mangleSymbol :: CompileLayer l => l -> ShortByteString -> IO MangledSymbol Source #

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 :: CompileLayer l => l -> ModuleSetHandle -> MangledSymbol -> Bool -> IO JITSymbol Source #

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

addModuleSet :: CompileLayer l => l -> [Module] -> SymbolResolver -> IO ModuleSetHandle Source #

Add a list of modules to the CompileLayer. The SymbolResolver is used to resolve external symbols in these modules.

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

removeModuleSet :: CompileLayer l => l -> ModuleSetHandle -> IO () Source #

Remove a set of previously added modules.

withModuleSet :: CompileLayer l => l -> [Module] -> SymbolResolver -> (ModuleSetHandle -> IO a) -> IO a Source #

bracket-style wrapper around addModuleSet and removeModuleSet.

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

disposeCompileLayer :: CompileLayer l => l -> IO () Source #

Dispose of a CompileLayer. This should called when the CompileLayer is not needed anymore.

data ModuleSetHandle Source #

Abstract type representing a set of modules in a CompileLayer.