Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class LinkingLayer l where
- disposeLinkingLayer :: LinkingLayer l => l -> IO ()
- addObjectFile :: LinkingLayer l => l -> ModuleKey -> ObjectFile -> IO ()
- data ObjectLinkingLayer = ObjectLinkingLayer {
- linkingLayer :: !(Ptr ObjectLinkingLayer)
- cleanupActions :: !(IORef [IO ()])
- newObjectLinkingLayer :: ExecutionSession -> (ModuleKey -> IO (Ptr SymbolResolver)) -> IO ObjectLinkingLayer
- withObjectLinkingLayer :: ExecutionSession -> (ModuleKey -> IO (Ptr SymbolResolver)) -> (ObjectLinkingLayer -> IO a) -> IO a
- findSymbol :: LinkingLayer l => l -> ShortByteString -> Bool -> IO (Either JITSymbolError JITSymbol)
- findSymbolIn :: LinkingLayer l => l -> ModuleKey -> ShortByteString -> Bool -> IO (Either JITSymbolError JITSymbol)
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
.
getLinkingLayer :: l -> Ptr LinkingLayer Source #
getCleanups :: l -> IORef [IO ()] Source #
Instances
LinkingLayer ObjectLinkingLayer Source # | |
Defined in LLVM.Internal.OrcJIT.LinkingLayer getLinkingLayer :: ObjectLinkingLayer -> Ptr LinkingLayer Source # getCleanups :: ObjectLinkingLayer -> IORef [IO ()] Source # |
disposeLinkingLayer :: LinkingLayer l => l -> IO () Source #
Dispose of a LinkingLayer
.
addObjectFile :: LinkingLayer l => l -> ModuleKey -> ObjectFile -> IO () Source #
Add an object file to the LinkingLayer
.
data ObjectLinkingLayer Source #
Bare bones implementation of a LinkingLayer
.
ObjectLinkingLayer | |
|
Instances
LinkingLayer ObjectLinkingLayer Source # | |
Defined in LLVM.Internal.OrcJIT.LinkingLayer getLinkingLayer :: ObjectLinkingLayer -> Ptr LinkingLayer Source # getCleanups :: ObjectLinkingLayer -> IORef [IO ()] Source # |
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.
withObjectLinkingLayer :: ExecutionSession -> (ModuleKey -> IO (Ptr SymbolResolver)) -> (ObjectLinkingLayer -> IO a) -> IO a Source #
bracket
-style wrapper around newObjectLinkingLayer
and disposeLinkingLayer
.
findSymbol :: LinkingLayer l => l -> ShortByteString -> Bool -> IO (Either JITSymbolError JITSymbol) Source #
searches for
findSymbol
layer symbol exportedSymbolsOnlysymbol
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 #
searches for
findSymbolIn
layer handle symbol exportedSymbolsOnlysymbol
in the context of the module represented by handle
. If
exportedSymbolsOnly
is True
only exported symbols are searched.