llvm-hs-7.0.1: General purpose LLVM bindings

Safe HaskellNone
LanguageHaskell2010

LLVM.Internal.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

addObjectFile :: LinkingLayer l => l -> ModuleKey -> ObjectFile -> IO () Source #

Add an object file to the LinkingLayer.

newObjectLinkingLayer :: ExecutionSession -> (ModuleKey -> IO (Ptr SymbolResolver)) -> IO ObjectLinkingLayer Source #

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

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 -> ModuleKey -> 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.