Add support for parameter attributes to the llvm BE binding
[ghc.git] / compiler / llvmGen / Llvm.hs
1 -- ----------------------------------------------------------------------------
2 -- | This module supplies bindings to generate Llvm IR from Haskell
3 -- (<http://www.llvm.org/docs/LangRef.html>).
4 --
5 -- Note: this module is developed in a demand driven way. It is no complete
6 -- LLVM binding library in Haskell, but enough to generate code for GHC.
7 --
8 -- This code is derived from code taken from the Essential Haskell Compiler
9 -- (EHC) project (<http://www.cs.uu.nl/wiki/Ehc/WebHome>).
10 --
11
12 module Llvm (
13
14 -- * Modules, Functions and Blocks
15 LlvmModule(..),
16
17 LlvmFunction(..), LlvmFunctionDecl(..),
18 LlvmFunctions, LlvmFunctionDecls,
19 LlvmStatement(..), LlvmExpression(..),
20 LlvmBlocks, LlvmBlock(..), LlvmBlockId,
21 LlvmParamAttr(..), LlvmParameter,
22
23 -- * Call Handling
24 LlvmCallConvention(..), LlvmCallType(..), LlvmParameterListType(..),
25 LlvmLinkageType(..), LlvmFuncAttr(..),
26
27 -- * Operations and Comparisons
28 LlvmCmpOp(..), LlvmMachOp(..), LlvmCastOp(..),
29
30 -- * Variables and Type System
31 LlvmVar(..), LlvmStatic(..), LlvmLit(..), LlvmType(..),
32 LMGlobal, LMString, LMSection, LMAlign,
33
34 -- ** Some basic types
35 i64, i32, i16, i8, i1, i8Ptr, llvmWord, llvmWordPtr,
36
37 -- ** Operations on the type system.
38 isGlobal, getLitType, getLit, getName, getPlainName, getVarType,
39 getLink, getStatType, getGlobalVar, getGlobalType, pVarLift, pVarLower,
40 pLift, pLower, isInt, isFloat, isPointer, llvmWidthInBits,
41
42 -- * Pretty Printing
43 ppLlvmModule, ppLlvmComments, ppLlvmComment, ppLlvmGlobals,
44 ppLlvmGlobal, ppLlvmFunctionDecls, ppLlvmFunctionDecl, ppLlvmFunctions,
45 ppLlvmFunction, ppLlvmType, ppLlvmTypes, llvmSDoc
46
47 ) where
48
49 import Llvm.AbsSyn
50 import Llvm.PpLlvm
51 import Llvm.Types
52