summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcocreature <>2017-10-12 09:33:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-10-12 09:33:00 (GMT)
commitb7ac772a97ae265ff9b0f550c2c46db60e55d800 (patch)
treef2a695234436931292f4eb581b7b604ec2dc6a58
parente9accd32df54d97d7676da9612268bc279c89484 (diff)
version 5.1.0HEAD5.1.0master
-rw-r--r--CHANGELOG.md8
-rw-r--r--llvm-hs-pure.cabal11
-rw-r--r--src/LLVM/AST/Attribute.hs4
-rw-r--r--src/LLVM/AST/CallingConvention.hs17
-rw-r--r--src/LLVM/AST/Instruction.hs2
-rw-r--r--src/LLVM/AST/ParameterAttribute.hs4
-rw-r--r--src/LLVM/TH.hs32
7 files changed, 37 insertions, 41 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9334e6..b234a82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 5.1.0 (2017-10-12)
+
+### Enhancements
+
+* Suport string attributes as parameter attributes
+* Support more calling conventions
+* Support `NoTail` `TailCallKind`
+
## 5.0.0 (2017-09-07)
* Support for LLVM 5.0
diff --git a/llvm-hs-pure.cabal b/llvm-hs-pure.cabal
index 28fb27c..5b92eb3 100644
--- a/llvm-hs-pure.cabal
+++ b/llvm-hs-pure.cabal
@@ -1,5 +1,5 @@
name: llvm-hs-pure
-version: 5.0.0
+version: 5.1.0
license: BSD3
license-file: LICENSE
author: Anthony Cowley, Stephen Diehl, Moritz Kiefer <moritz.kiefer@purelyfunctional.org>, Benjamin S. Scarlet
@@ -16,7 +16,7 @@ description:
llvm-hs-pure is a set of pure Haskell types and functions for interacting with LLVM <http://llvm.org/>.
It includes an ADT to represent LLVM IR (<http://llvm.org/docs/LangRef.html>). The llvm-hs package
builds on this one with FFI bindings to LLVM, but llvm-hs-pure does not require LLVM to be available.
-tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
extra-source-files: CHANGELOG.md
source-repository head
@@ -32,7 +32,7 @@ library
ghc-options: -Wall
if flag(semigroups)
build-depends:
- base >= 4.7 && < 4.9,
+ base >= 4.8 && < 4.9,
semigroups >= 0.18 && < 0.19
else
build-depends:
@@ -41,7 +41,6 @@ library
attoparsec >= 0.13,
bytestring >= 0.10 && < 0.11,
transformers >= 0.3 && < 0.6,
- transformers-compat >= 0.4,
mtl >= 2.1,
template-haskell >= 2.5.0.0,
containers >= 0.4.2.1
@@ -82,13 +81,12 @@ library
LLVM.AST.COMDAT
LLVM.DataLayout
LLVM.Prelude
- LLVM.TH
test-suite test
type: exitcode-stdio-1.0
if flag(semigroups)
build-depends:
- base >= 4.7 && < 4.9,
+ base >= 4.8 && < 4.9,
semigroups >= 0.18 && < 0.19
else
build-depends:
@@ -99,7 +97,6 @@ test-suite test
tasty-quickcheck >= 0.8,
llvm-hs-pure,
transformers >= 0.3,
- transformers-compat >= 0.4,
containers >= 0.4.2.1,
mtl >= 2.1
hs-source-dirs: test
diff --git a/src/LLVM/AST/Attribute.hs b/src/LLVM/AST/Attribute.hs
index ed31464..06b5c9f 100644
--- a/src/LLVM/AST/Attribute.hs
+++ b/src/LLVM/AST/Attribute.hs
@@ -13,5 +13,7 @@ module LLVM.AST.Attribute (
GroupID(..)
) where
-import LLVM.AST.ParameterAttribute hiding (ReadNone, ReadOnly, WriteOnly)
+import LLVM.AST.ParameterAttribute
+ hiding (ReadNone, ReadOnly, StringAttribute, WriteOnly,
+ stringAttributeKind, stringAttributeValue)
import LLVM.AST.FunctionAttribute
diff --git a/src/LLVM/AST/CallingConvention.hs b/src/LLVM/AST/CallingConvention.hs
index b563dba..06b25a0 100644
--- a/src/LLVM/AST/CallingConvention.hs
+++ b/src/LLVM/AST/CallingConvention.hs
@@ -14,6 +14,8 @@ data CallingConvention
| AnyReg
| PreserveMost
| PreserveAll
+ | Swift
+ | CXX_FastTLS
| X86_StdCall
| X86_FastCall
| ARM_APCS
@@ -28,6 +30,21 @@ data CallingConvention
| Intel_OCL_BI
| X86_64_SysV
| Win64
+ | X86_VectorCall
+ | HHVM
+ | HHVM_C
+ | X86_Intr
+ | AVR_Intr
+ | AVR_Signal
+ | AVR_Builtin
+ | AMDGPU_VS
+ | AMDGPU_HS
+ | AMDGPU_GS
+ | AMDGPU_PS
+ | AMDGPU_CS
+ | AMDGPU_Kernel
+ | X86_RegCall
+ | MSP430_Builtin
| Numbered Word32
deriving (Eq, Read, Show, Typeable, Data, Generic)
diff --git a/src/LLVM/AST/Instruction.hs b/src/LLVM/AST/Instruction.hs
index 1739683..7354f46 100644
--- a/src/LLVM/AST/Instruction.hs
+++ b/src/LLVM/AST/Instruction.hs
@@ -123,7 +123,7 @@ data LandingPadClause
-- | For the call instruction
-- <http://llvm.org/docs/LangRef.html#call-instruction>
-data TailCallKind = Tail | MustTail
+data TailCallKind = Tail | MustTail | NoTail
deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)
-- | non-terminator instructions:
diff --git a/src/LLVM/AST/ParameterAttribute.hs b/src/LLVM/AST/ParameterAttribute.hs
index 0730960..c8c1cdd 100644
--- a/src/LLVM/AST/ParameterAttribute.hs
+++ b/src/LLVM/AST/ParameterAttribute.hs
@@ -24,4 +24,8 @@ data ParameterAttribute
| Returned
| SwiftSelf
| SwiftError
+ | StringAttribute {
+ stringAttributeKind :: ShortByteString,
+ stringAttributeValue :: ShortByteString -- ^ Use "" for no value -- the two are conflated
+ }
deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)
diff --git a/src/LLVM/TH.hs b/src/LLVM/TH.hs
deleted file mode 100644
index 5c49ab4..0000000
--- a/src/LLVM/TH.hs
+++ /dev/null
@@ -1,32 +0,0 @@
-{-# LANGUAGE CPP #-}
--- | This module is presents template haskell mostly like the template-haskell >= 2.10 / ghc >= 7.10,
--- even on earlier versions. It's intended as an internal library for llvm-hs-pure and llvm-hs;
--- it's exposed only to be shared between the two.
-module LLVM.TH (
- module Language.Haskell.TH,
- conT, appT
- ) where
-
-#if __GLASGOW_HASKELL__ < 710
-import LLVM.Prelude
-#endif
-
-import qualified Language.Haskell.TH as TH (conT, appT)
-import Language.Haskell.TH hiding (conT, appT)
-
-class Typish qt where
- appT :: qt -> Q Type -> qt
- conT :: Name -> qt
-
-instance Typish (Q Type) where
- appT = TH.appT
- conT = TH.conT
-
-#if __GLASGOW_HASKELL__ < 710
-instance Typish (Q Pred) where
- appT qp qt = do
- ClassP n ts <- qp
- t <- qt
- return $ ClassP n (ts ++ [t])
- conT n = classP n []
-#endif