Safe Haskell | Safe |
---|---|
Language | Haskell98 |
LLVM.AST
Description
This module and descendants define AST data types to represent LLVM code. Note that these types are designed for fidelity rather than convenience - if the truth of what LLVM supports is less than pretty, so be it.
Synopsis
- data Module = Module {}
- defaultModule :: Module
- data Definition
- data Global
- = GlobalVariable Name Linkage Visibility (Maybe StorageClass) (Maybe Model) (Maybe UnnamedAddr) Bool Type AddrSpace (Maybe Constant) (Maybe ShortByteString) (Maybe ShortByteString) Word32
- | GlobalAlias Name Linkage Visibility (Maybe StorageClass) (Maybe Model) (Maybe UnnamedAddr) Type AddrSpace Constant
- | Function Linkage Visibility (Maybe StorageClass) CallingConvention [ParameterAttribute] Type Name ([Parameter], Bool) [Either GroupID FunctionAttribute] (Maybe ShortByteString) (Maybe ShortByteString) Word32 (Maybe ShortByteString) (Maybe Constant) [BasicBlock] (Maybe Constant)
- globalVariableDefaults :: Global
- globalAliasDefaults :: Global
- functionDefaults :: Global
- data UnnamedAddr
- data Parameter = Parameter Type Name [ParameterAttribute]
- data BasicBlock = BasicBlock Name [Named Instruction] (Named Terminator)
- module LLVM.AST.Instruction
- module LLVM.AST.Name
- module LLVM.AST.Operand
- data Type
- = VoidType
- | IntegerType { }
- | PointerType { }
- | FloatingPointType { }
- | FunctionType {
- resultType :: Type
- argumentTypes :: [Type]
- isVarArg :: Bool
- | VectorType { }
- | StructureType {
- isPacked :: Bool
- elementTypes :: [Type]
- | ArrayType { }
- | NamedTypeReference Name
- | MetadataType
- | LabelType
- | TokenType
- data FloatingPointType
Documentation
Constructors
Module | |
Fields
|
Instances
Eq Module Source # | |
Data Module Source # | |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Module -> c Module # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Module # toConstr :: Module -> Constr # dataTypeOf :: Module -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Module) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module) # gmapT :: (forall b. Data b => b -> b) -> Module -> Module # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r # gmapQ :: (forall d. Data d => d -> u) -> Module -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Module -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Module -> m Module # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module # | |
Read Module Source # | |
Show Module Source # | |
Generic Module Source # | |
type Rep Module Source # | |
type Rep Module = D1 (MetaData "Module" "LLVM.AST" "llvm-hs-pure-6.0.0-JDMT8hd3oKgE19P5EBaRIN" False) (C1 (MetaCons "Module" PrefixI True) ((S1 (MetaSel (Just "moduleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortByteString) :*: S1 (MetaSel (Just "moduleSourceFileName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortByteString)) :*: (S1 (MetaSel (Just "moduleDataLayout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe DataLayout)) :*: (S1 (MetaSel (Just "moduleTargetTriple") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe ShortByteString)) :*: S1 (MetaSel (Just "moduleDefinitions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Definition]))))) |
defaultModule :: Module Source #
helper for making Module
s
data Definition Source #
Any thing which can be at the top level of a Module
Constructors
Instances
Constructors
Instances
globalVariableDefaults :: Global Source #
helper for making GlobalVariable
s
globalAliasDefaults :: Global Source #
helper for making GlobalAlias
s
functionDefaults :: Global Source #
helper for making Function
s
data UnnamedAddr Source #
Constructors
LocalAddr | |
GlobalAddr |
Instances
Eq UnnamedAddr Source # | |
Data UnnamedAddr Source # | |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnnamedAddr -> c UnnamedAddr # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnnamedAddr # toConstr :: UnnamedAddr -> Constr # dataTypeOf :: UnnamedAddr -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnnamedAddr) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnnamedAddr) # gmapT :: (forall b. Data b => b -> b) -> UnnamedAddr -> UnnamedAddr # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnnamedAddr -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnnamedAddr -> r # gmapQ :: (forall d. Data d => d -> u) -> UnnamedAddr -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UnnamedAddr -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnnamedAddr -> m UnnamedAddr # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnnamedAddr -> m UnnamedAddr # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnnamedAddr -> m UnnamedAddr # | |
Read UnnamedAddr Source # | |
Methods readsPrec :: Int -> ReadS UnnamedAddr # readList :: ReadS [UnnamedAddr] # readPrec :: ReadPrec UnnamedAddr # readListPrec :: ReadPrec [UnnamedAddr] # | |
Show UnnamedAddr Source # | |
Methods showsPrec :: Int -> UnnamedAddr -> ShowS # show :: UnnamedAddr -> String # showList :: [UnnamedAddr] -> ShowS # | |
Generic UnnamedAddr Source # | |
Associated Types type Rep UnnamedAddr :: * -> * # | |
type Rep UnnamedAddr Source # | |
Constructors
Parameter Type Name [ParameterAttribute] |
Instances
Eq Parameter Source # | |
Data Parameter Source # | |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parameter -> c Parameter # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Parameter # toConstr :: Parameter -> Constr # dataTypeOf :: Parameter -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Parameter) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Parameter) # gmapT :: (forall b. Data b => b -> b) -> Parameter -> Parameter # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parameter -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parameter -> r # gmapQ :: (forall d. Data d => d -> u) -> Parameter -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Parameter -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parameter -> m Parameter # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parameter -> m Parameter # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parameter -> m Parameter # | |
Read Parameter Source # | |
Show Parameter Source # | |
Generic Parameter Source # | |
Typed Parameter Source # | |
type Rep Parameter Source # | |
type Rep Parameter = D1 (MetaData "Parameter" "LLVM.AST.Global" "llvm-hs-pure-6.0.0-JDMT8hd3oKgE19P5EBaRIN" False) (C1 (MetaCons "Parameter" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Type) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ParameterAttribute])))) |
data BasicBlock Source #
http://llvm.org/doxygen/classllvm_1_1BasicBlock.html
LLVM code in a function is a sequence of BasicBlock
s each with a label,
some instructions, and a terminator.
Constructors
BasicBlock Name [Named Instruction] (Named Terminator) |
Instances
module LLVM.AST.Instruction
module LLVM.AST.Name
module LLVM.AST.Operand
Constructors
VoidType | |
IntegerType | |
PointerType | |
Fields | |
FloatingPointType | |
Fields | |
FunctionType | |
Fields
| |
VectorType | |
Fields
| |
StructureType | |
Fields
| |
ArrayType | |
Fields
| |
NamedTypeReference Name | |
MetadataType | |
LabelType | |
TokenType |
Instances
data FloatingPointType Source #
LLVM supports some special formats floating point format. This type is to distinguish those format. Also see http://llvm.org/docs/LangRef.html#floating-point-types
Constructors
HalfFP | 16-bit floating point value |
FloatFP | 32-bit floating point value |
DoubleFP | 64-bit floating point value |
FP128FP | 128-bit floating point value (112-bit mantissa) |
X86_FP80FP | 80-bit floating point value (X87) |
PPC_FP128FP | 128-bit floating point value (two 64-bits) |