llvm-ffi 9.1.0.1 → 9.1.1
raw patch · 7 files changed
+28/−31 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- LLVM.FFI.Core: instance [safe] Bounded CallingConvention
- LLVM.FFI.Core: instance [safe] Bounded TypeKind
- LLVM.FFI.Core: instance [safe] Enum CallingConvention
- LLVM.FFI.Core: instance [safe] Enum FPPredicate
- LLVM.FFI.Core: instance [safe] Enum IntPredicate
- LLVM.FFI.Core: instance [safe] Enum Linkage
- LLVM.FFI.Core: instance [safe] Enum TypeKind
- LLVM.FFI.Core: instance [safe] Enum Visibility
- LLVM.FFI.Core: instance [safe] Eq CallingConvention
- LLVM.FFI.Core: instance [safe] Eq FPPredicate
- LLVM.FFI.Core: instance [safe] Eq IntPredicate
- LLVM.FFI.Core: instance [safe] Eq Linkage
- LLVM.FFI.Core: instance [safe] Eq TypeKind
- LLVM.FFI.Core: instance [safe] Eq Visibility
- LLVM.FFI.Core: instance [safe] Ord CallingConvention
- LLVM.FFI.Core: instance [safe] Ord FPPredicate
- LLVM.FFI.Core: instance [safe] Ord IntPredicate
- LLVM.FFI.Core: instance [safe] Ord Linkage
- LLVM.FFI.Core: instance [safe] Ord TypeKind
- LLVM.FFI.Core: instance [safe] Ord Visibility
- LLVM.FFI.Core: instance [safe] Read TypeKind
- LLVM.FFI.Core: instance [safe] Show CallingConvention
- LLVM.FFI.Core: instance [safe] Show FPPredicate
- LLVM.FFI.Core: instance [safe] Show IntPredicate
- LLVM.FFI.Core: instance [safe] Show Linkage
- LLVM.FFI.Core: instance [safe] Show TypeKind
- LLVM.FFI.Core: instance [safe] Show Visibility
- LLVM.FFI.Core: instance [safe] Typeable CallingConvention
- LLVM.FFI.Core: instance [safe] Typeable FPPredicate
- LLVM.FFI.Core: instance [safe] Typeable IntPredicate
- LLVM.FFI.Core: instance [safe] Typeable Linkage
- LLVM.FFI.Core: instance [safe] Typeable TypeKind
- LLVM.FFI.ExecutionEngine: instance [safe] Bounded EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Enum EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Eq EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Ord EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Read EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Show EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Typeable EngineKind
- LLVM.FFI.ExecutionEngine: instance [safe] Typeable ExecutionEngine
- LLVM.FFI.ExecutionEngine: instance [safe] Typeable GenericValue
- LLVM.FFI.ExecutionEngine: instance [safe] Typeable MCJITCompilerOptions
- LLVM.FFI.Support.Host: instance [safe] Typeable FeatureIterator
- LLVM.FFI.Support.Host: instance [safe] Typeable FeatureMap
- LLVM.FFI.Target: instance [safe] Eq ByteOrdering
- LLVM.FFI.Target: instance [safe] Typeable TargetData
- LLVM.FFI.Target: instance [safe] Typeable TargetLibraryInfo
- LLVM.FFI.Transforms.PassManagerBuilder: instance [safe] Typeable PassManagerBuilder
- LLVM.FFI.Transforms.Vectorize: addBBPass :: PassManagerRef -> IO ()
+ LLVM.FFI.Core: instance GHC.Classes.Eq LLVM.FFI.Core.CallingConvention
+ LLVM.FFI.Core: instance GHC.Classes.Eq LLVM.FFI.Core.FPPredicate
+ LLVM.FFI.Core: instance GHC.Classes.Eq LLVM.FFI.Core.IntPredicate
+ LLVM.FFI.Core: instance GHC.Classes.Eq LLVM.FFI.Core.Linkage
+ LLVM.FFI.Core: instance GHC.Classes.Eq LLVM.FFI.Core.TypeKind
+ LLVM.FFI.Core: instance GHC.Classes.Eq LLVM.FFI.Core.Visibility
+ LLVM.FFI.Core: instance GHC.Classes.Ord LLVM.FFI.Core.CallingConvention
+ LLVM.FFI.Core: instance GHC.Classes.Ord LLVM.FFI.Core.FPPredicate
+ LLVM.FFI.Core: instance GHC.Classes.Ord LLVM.FFI.Core.IntPredicate
+ LLVM.FFI.Core: instance GHC.Classes.Ord LLVM.FFI.Core.Linkage
+ LLVM.FFI.Core: instance GHC.Classes.Ord LLVM.FFI.Core.TypeKind
+ LLVM.FFI.Core: instance GHC.Classes.Ord LLVM.FFI.Core.Visibility
+ LLVM.FFI.Core: instance GHC.Enum.Bounded LLVM.FFI.Core.CallingConvention
+ LLVM.FFI.Core: instance GHC.Enum.Bounded LLVM.FFI.Core.TypeKind
+ LLVM.FFI.Core: instance GHC.Enum.Enum LLVM.FFI.Core.CallingConvention
+ LLVM.FFI.Core: instance GHC.Enum.Enum LLVM.FFI.Core.FPPredicate
+ LLVM.FFI.Core: instance GHC.Enum.Enum LLVM.FFI.Core.IntPredicate
+ LLVM.FFI.Core: instance GHC.Enum.Enum LLVM.FFI.Core.Linkage
+ LLVM.FFI.Core: instance GHC.Enum.Enum LLVM.FFI.Core.TypeKind
+ LLVM.FFI.Core: instance GHC.Enum.Enum LLVM.FFI.Core.Visibility
+ LLVM.FFI.Core: instance GHC.Read.Read LLVM.FFI.Core.TypeKind
+ LLVM.FFI.Core: instance GHC.Show.Show LLVM.FFI.Core.CallingConvention
+ LLVM.FFI.Core: instance GHC.Show.Show LLVM.FFI.Core.FPPredicate
+ LLVM.FFI.Core: instance GHC.Show.Show LLVM.FFI.Core.IntPredicate
+ LLVM.FFI.Core: instance GHC.Show.Show LLVM.FFI.Core.Linkage
+ LLVM.FFI.Core: instance GHC.Show.Show LLVM.FFI.Core.TypeKind
+ LLVM.FFI.Core: instance GHC.Show.Show LLVM.FFI.Core.Visibility
+ LLVM.FFI.ExecutionEngine: instance GHC.Classes.Eq LLVM.FFI.ExecutionEngine.EngineKind
+ LLVM.FFI.ExecutionEngine: instance GHC.Classes.Ord LLVM.FFI.ExecutionEngine.EngineKind
+ LLVM.FFI.ExecutionEngine: instance GHC.Enum.Bounded LLVM.FFI.ExecutionEngine.EngineKind
+ LLVM.FFI.ExecutionEngine: instance GHC.Enum.Enum LLVM.FFI.ExecutionEngine.EngineKind
+ LLVM.FFI.ExecutionEngine: instance GHC.Read.Read LLVM.FFI.ExecutionEngine.EngineKind
+ LLVM.FFI.ExecutionEngine: instance GHC.Show.Show LLVM.FFI.ExecutionEngine.EngineKind
+ LLVM.FFI.Target: getModuleDataLayout :: ModuleRef -> IO TargetDataRef
+ LLVM.FFI.Target: instance GHC.Classes.Eq LLVM.FFI.Target.ByteOrdering
+ LLVM.FFI.Target: setModuleDataLayout :: ModuleRef -> TargetDataRef -> IO ()
- LLVM.FFI.Analysis: verifyModule :: ModuleRef -> VerifierFailureAction -> (Ptr CString) -> IO Bool
+ LLVM.FFI.Analysis: verifyModule :: ModuleRef -> VerifierFailureAction -> Ptr CString -> IO Bool
- LLVM.FFI.BitReader: getBitcodeModule :: MemoryBufferRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO Bool
+ LLVM.FFI.BitReader: getBitcodeModule :: MemoryBufferRef -> Ptr ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.BitReader: getBitcodeModuleInContext :: ContextRef -> MemoryBufferRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO Bool
+ LLVM.FFI.BitReader: getBitcodeModuleInContext :: ContextRef -> MemoryBufferRef -> Ptr ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.BitReader: parseBitcode :: MemoryBufferRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO Bool
+ LLVM.FFI.BitReader: parseBitcode :: MemoryBufferRef -> Ptr ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.BitReader: parseBitcodeInContext :: ContextRef -> MemoryBufferRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO Bool
+ LLVM.FFI.BitReader: parseBitcodeInContext :: ContextRef -> MemoryBufferRef -> Ptr ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.Core: Bool :: (Int32) -> Bool
+ LLVM.FFI.Core: Bool :: Int32 -> Bool
- LLVM.FFI.Core: buildAggregateRet :: BuilderRef -> (Ptr ValueRef) -> CUInt -> IO ValueRef
+ LLVM.FFI.Core: buildAggregateRet :: BuilderRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- LLVM.FFI.Core: ptrDisposeBuilder :: FunPtr (BuilderRef -> IO ())
+ LLVM.FFI.Core: ptrDisposeBuilder :: FinalizerPtr Builder
- LLVM.FFI.Core: ptrDisposeModule :: FunPtr (ModuleRef -> IO ())
+ LLVM.FFI.Core: ptrDisposeModule :: FinalizerPtr Module
- LLVM.FFI.Core: ptrDisposePassManager :: FunPtr (PassManagerRef -> IO ())
+ LLVM.FFI.Core: ptrDisposePassManager :: FinalizerPtr PassManager
- LLVM.FFI.ExecutionEngine: createExecutionEngineForModule :: (Ptr ExecutionEngineRef) -> ModuleRef -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: createExecutionEngineForModule :: Ptr ExecutionEngineRef -> ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.ExecutionEngine: createExecutionEngineForModuleCPU :: (Ptr ExecutionEngineRef) -> ModuleRef -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: createExecutionEngineForModuleCPU :: Ptr ExecutionEngineRef -> ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.ExecutionEngine: createExecutionEngineKindForModuleCPU :: (Ptr ExecutionEngineRef) -> EngineKindSet -> ModuleRef -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: createExecutionEngineKindForModuleCPU :: Ptr ExecutionEngineRef -> EngineKindSet -> ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.ExecutionEngine: createInterpreterForModule :: (Ptr ExecutionEngineRef) -> ModuleRef -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: createInterpreterForModule :: Ptr ExecutionEngineRef -> ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.ExecutionEngine: createInterpreterForModuleCPU :: (Ptr ExecutionEngineRef) -> ModuleRef -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: createInterpreterForModuleCPU :: Ptr ExecutionEngineRef -> ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.ExecutionEngine: createJITCompilerForModule :: (Ptr ExecutionEngineRef) -> ModuleRef -> CUInt -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: createJITCompilerForModule :: Ptr ExecutionEngineRef -> ModuleRef -> CUInt -> Ptr CString -> IO Bool
- LLVM.FFI.ExecutionEngine: ptrDisposeExecutionEngine :: FunPtr (ExecutionEngineRef -> IO ())
+ LLVM.FFI.ExecutionEngine: ptrDisposeExecutionEngine :: FinalizerPtr ExecutionEngine
- LLVM.FFI.ExecutionEngine: ptrDisposeGenericValue :: FunPtr (GenericValueRef -> IO ())
+ LLVM.FFI.ExecutionEngine: ptrDisposeGenericValue :: FinalizerPtr GenericValue
- LLVM.FFI.ExecutionEngine: removeModule :: ExecutionEngineRef -> ModuleRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO Bool
+ LLVM.FFI.ExecutionEngine: removeModule :: ExecutionEngineRef -> ModuleRef -> Ptr ModuleRef -> Ptr CString -> IO Bool
- LLVM.FFI.Target: ByteOrdering :: (Word32) -> ByteOrdering
+ LLVM.FFI.Target: ByteOrdering :: Word32 -> ByteOrdering
- LLVM.FFI.Target: ptrDisposeTargetData :: FunPtr (TargetDataRef -> IO ())
+ LLVM.FFI.Target: ptrDisposeTargetData :: FinalizerPtr TargetData
Files
- llvm-ffi.cabal +5/−6
- src/LLVM/FFI/Base.hsc +7/−1
- src/LLVM/FFI/Core.hsc +4/−4
- src/LLVM/FFI/ExecutionEngine.hs +4/−3
- src/LLVM/FFI/Target.hsc +8/−3
- src/LLVM/FFI/Transforms/Vectorize.hs +0/−3
- src/LLVM/Target/CppBackend.hs +0/−11
llvm-ffi.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: llvm-ffi-Version: 9.1.0.1+Version: 9.1.1 License: BSD-3-Clause License-File: LICENSE Synopsis: FFI bindings to the LLVM compiler toolkit.@@ -110,16 +110,16 @@ Source-Repository head Type: darcs- Location: http://hub.darcs.net/thielema/llvm-ffi/+ Location: https://hub.darcs.net/thielema/llvm-ffi/ Source-Repository this- Tag: 9.1.0.1+ Tag: 9.1.1 Type: darcs- Location: http://hub.darcs.net/thielema/llvm-ffi/+ Location: https://hub.darcs.net/thielema/llvm-ffi/ Library Build-Depends:- enumset >=0.0.5 && <0.1,+ enumset >=0.0.5 && <0.2, base >= 3 && < 5 Hs-Source-Dirs: src@@ -148,7 +148,6 @@ LLVM.FFI.Base LLVM.FFI.Version LLVM.Target.ARM- LLVM.Target.CppBackend LLVM.Target.Hexagon LLVM.Target.MSP430 LLVM.Target.Mips
src/LLVM/FFI/Base.hsc view
@@ -1,13 +1,19 @@ {-# LANGUAGE Safe #-} module LLVM.FFI.Base where +-- import Foreign.ForeignPtr (FinalizerPtr) -- unsafe before GHC-7.10+import Foreign.Ptr (Ptr, FunPtr)+ import qualified Data.Bool as Bool import Data.Int (Int32) import Prelude- (Eq, Enum, Show, fromIntegral, show, fromEnum, toEnum, (.), (==))+ (IO, Eq, Enum, Show, fromIntegral, show, fromEnum, toEnum, (.), (==)) #include <llvm-c/Core.h>+++type FinalizerPtr a = FunPtr (Ptr a -> IO ()) newtype Bool = Bool (#type LLVMBool)
src/LLVM/FFI/Core.hsc view
@@ -610,7 +610,7 @@ import qualified Foreign.C.Types as C import Foreign.C.String (CString)-import Foreign.Ptr (Ptr, FunPtr)+import Foreign.Ptr (Ptr) import Data.Typeable (Typeable) @@ -958,7 +958,7 @@ disposeModule = Raw.disposeModule foreign import ccall unsafe "&LLVMDisposeModule" ptrDisposeModule- :: FunPtr (ModuleRef -> IO ())+ :: LLVM.FinalizerPtr Raw.Module -- ** Data Layout getDataLayout :: ModuleRef -> IO CString@@ -1906,7 +1906,7 @@ insertIntoBuilderWithName = Raw.insertIntoBuilderWithName foreign import ccall unsafe "&LLVMDisposeBuilder" ptrDisposeBuilder- :: FunPtr (BuilderRef -> IO ())+ :: LLVM.FinalizerPtr Raw.Builder -- ** Metadata@@ -2271,7 +2271,7 @@ disposePassManager = Raw.disposePassManager foreign import ccall unsafe "&LLVMDisposePassManager" ptrDisposePassManager- :: FunPtr (PassManagerRef -> IO ())+ :: LLVM.FinalizerPtr Raw.PassManager -- ** Functions from extras.cpp
src/LLVM/FFI/ExecutionEngine.hs view
@@ -58,7 +58,8 @@ import qualified LLVM.FFI.Core as LLVM import LLVM.FFI.Core (ModuleRef, TypeRef, ValueRef)-import LLVM.FFI.Target(TargetDataRef)+import LLVM.FFI.Target (TargetDataRef)+import LLVM.FFI.Base (FinalizerPtr) import qualified Foreign.C.Types as C import Foreign.C.String (CString)@@ -110,7 +111,7 @@ foreign import ccall unsafe "LLVMGenericValueToFloat" genericValueToFloat :: TypeRef -> GenericValueRef -> IO CDouble foreign import ccall unsafe "&LLVMDisposeGenericValue" ptrDisposeGenericValue- :: FunPtr (GenericValueRef -> IO ())+ :: FinalizerPtr GenericValue data EngineKind@@ -152,7 +153,7 @@ foreign import ccall unsafe "LLVMDisposeExecutionEngine" disposeExecutionEngine :: ExecutionEngineRef -> IO () foreign import ccall unsafe "&LLVMDisposeExecutionEngine" ptrDisposeExecutionEngine- :: FunPtr (ExecutionEngineRef -> IO ())+ :: FinalizerPtr ExecutionEngine foreign import ccall unsafe "LLVMRunStaticConstructors" runStaticConstructors :: ExecutionEngineRef -> IO () foreign import ccall unsafe "LLVMRunStaticDestructors" runStaticDestructors
src/LLVM/FFI/Target.hsc view
@@ -5,11 +5,12 @@ module LLVM.FFI.Target where -import LLVM.FFI.Core (ValueRef, TypeRef, PassManagerRef)+import LLVM.FFI.Core (ValueRef, TypeRef, PassManagerRef, ModuleRef)+import LLVM.FFI.Base (FinalizerPtr) import qualified Foreign.C.Types as C import Foreign.C.String (CString)-import Foreign.Ptr (Ptr, FunPtr)+import Foreign.Ptr (Ptr) import Data.Typeable (Typeable) import Data.Word (Word32)@@ -37,12 +38,16 @@ deriving (Typeable) type TargetLibraryInfoRef = Ptr TargetLibraryInfo +foreign import ccall unsafe "LLVMGetModuleDataLayout" getModuleDataLayout+ :: ModuleRef -> IO TargetDataRef+foreign import ccall unsafe "LLVMSetModuleDataLayout" setModuleDataLayout+ :: ModuleRef -> TargetDataRef -> IO () foreign import ccall unsafe "LLVMCreateTargetData" createTargetData :: CString -> IO TargetDataRef foreign import ccall unsafe "LLVMDisposeTargetData" disposeTargetData :: TargetDataRef -> IO () foreign import ccall unsafe "&LLVMDisposeTargetData" ptrDisposeTargetData- :: FunPtr (TargetDataRef -> IO ())+ :: FinalizerPtr TargetData foreign import ccall unsafe "LLVMAddTargetLibraryInfo" addTargetLibraryInfo :: TargetLibraryInfoRef -> PassManagerRef -> IO () foreign import ccall unsafe "LLVMCopyStringRepOfTargetData" copyStringRepOfTargetData
src/LLVM/FFI/Transforms/Vectorize.hs view
@@ -5,9 +5,6 @@ import LLVM.FFI.Core (PassManagerRef) -foreign import ccall unsafe "LLVMAddBBVectorizePass" addBBPass- :: PassManagerRef -> IO ()- foreign import ccall unsafe "LLVMAddLoopVectorizePass" addLoopPass :: PassManagerRef -> IO ()
− src/LLVM/Target/CppBackend.hs
@@ -1,11 +0,0 @@-{-# LANGUAGE Safe #-}-{-# LANGUAGE ForeignFunctionInterface #-}-module LLVM.Target.CppBackend(initializeTarget) where--initializeTarget :: IO ()-initializeTarget = do- initializeCppBackendTargetInfo- initializeCppBackendTarget--foreign import ccall unsafe "LLVMInitializeCppBackendTargetInfo" initializeCppBackendTargetInfo :: IO ()-foreign import ccall unsafe "LLVMInitializeCppBackendTarget" initializeCppBackendTarget :: IO ()