llvm-hs-6.3.0: General purpose LLVM bindings

Safe HaskellNone
LanguageHaskell2010

LLVM.OrcJIT.LinkingLayer

Synopsis

Documentation

class LinkingLayer l where Source #

After a CompileLayer has compiled the modules to object code, it passes the resulting object files to a LinkingLayer.

Minimal complete definition

getLinkingLayer, getCleanups

newObjectLinkingLayer :: IO ObjectLinkingLayer Source #

Create a new ObjectLinkingLayer. This should be disposed using disposeLinkingLayer when it is no longer needed.

addObjectFile :: LinkingLayer l => l -> ObjectFile -> SymbolResolver -> IO ObjectHandle Source #

Add an object file to the LinkingLayer. The SymbolResolver is used to resolve external symbols in the module.

findSymbol :: LinkingLayer l => l -> ShortByteString -> Bool -> IO (Either JITSymbolError 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 :: LinkingLayer l => l -> ObjectHandle -> ShortByteString -> Bool -> IO (Either JITSymbolError JITSymbol) Source #

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.