{-# LANGUAGE ForeignFunctionInterface #-} -- | Functions for handling the LLVMContext class. In all other LLVM interfaces, -- | prefer the newer explicitly thread-aware variants which use contexts -- | over corresponding older variants which implicitly reference a global context. -- | This choice allows multiple threads to do independent work with LLVM safely. module LLVM.General.Internal.FFI.Context where import Foreign.Ptr -- | a blind type to correspond to LLVMContext data Context -- | foreign import ccall unsafe "LLVMContextCreate" contextCreate :: IO (Ptr Context) -- | foreign import ccall unsafe "LLVMGetGlobalContext" getGlobalContext :: IO (Ptr Context) -- | foreign import ccall unsafe "LLVMContextDispose" contextDispose :: Ptr Context -> IO ()