llvm-pretty-0.11.0: A pretty printing library inspired by the llvm binding.

CopyrightTrevor Elliott 2011-2016
LicenseBSD3
Maintainerawesomelyawesome@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Text.LLVM.PP

Description

This is the pretty-printer for llvm assembly versions 3.6 and lower.

Synopsis

Documentation

type LLVM = ?config :: Config Source #

data Config Source #

The differences between various versions of the llvm textual AST.

Constructors

Config 

Fields

withConfig :: Config -> (LLVM => a) -> a Source #

ppLLVM :: (LLVM => a) -> a Source #

ppLLVM35 :: (LLVM => a) -> a Source #

ppLLVM36 :: (LLVM => a) -> a Source #

ppLLVM37 :: (LLVM => a) -> a Source #

ppLLVM38 :: (LLVM => a) -> a Source #

ppDataLayout :: DataLayout -> Doc Source #

Pretty print a data layout specification.

ppLayoutSpec :: LayoutSpec -> Doc Source #

Pretty print a single layout specification.

ppLayoutBody :: Int -> Int -> Maybe Int -> Doc Source #

Pretty-print the common case for data layout specifications.

ppInlineAsm :: InlineAsm -> Doc Source #

Pretty-print the inline assembly block.

validIdentifier :: String -> Bool Source #

According to the LLVM Language Reference Manual, the regular expression for LLVM identifiers is "[-a-zA-Z$._][-a-zA-Z$._0-9]". Identifiers may also be strings of one or more decimal digits.

ppTyped :: (a -> Doc) -> Typed a -> Doc Source #

ppCall :: LLVM => Bool -> Type -> Value -> [Typed Value] -> Doc Source #

ppValue' :: LLVM => (i -> Doc) -> Value' i -> Doc Source #

ppValMd' :: LLVM => (i -> Doc) -> ValMd' i -> Doc Source #

ppDebugLoc' :: LLVM => (i -> Doc) -> DebugLoc' i -> Doc Source #

ppMetadataNode' :: LLVM => (i -> Doc) -> [Maybe (ValMd' i)] -> Doc Source #

ppConstExpr' :: LLVM => (i -> Doc) -> ConstExpr' i -> Doc Source #

ppDebugInfo' :: LLVM => (i -> Doc) -> DebugInfo' i -> Doc Source #

ppDILabel' :: LLVM => (i -> Doc) -> DILabel' i -> Doc Source #

ppDISubprogram' :: LLVM => (i -> Doc) -> DISubprogram' i -> Doc Source #

See writeDISubprogram in the LLVM source, in the file AsmWriter.cpp

ppArgList :: Bool -> [Doc] -> Doc Source #

Build a variable-argument argument list.

hex :: (Integral i, Show i) => i -> Doc Source #

opt :: Bool -> Doc -> Doc Source #

mcommas :: [Maybe Doc] -> Doc Source #

Helpful for all of the optional fields that appear in the metadata values

ppMaybe :: (a -> Doc) -> Maybe a -> Doc Source #