ghc-7.0.3: The GHC API

Llvm.PpLlvm

Contents

- Top level LLVM objects.
- Utility functions

Description

Pretty print LLVM IR Code.

Synopsis

- ppLlvmModule :: LlvmModule -> Doc
- ppLlvmComments :: [LMString] -> Doc
- ppLlvmComment :: LMString -> Doc
- ppLlvmGlobals :: [LMGlobal] -> Doc
- ppLlvmGlobal :: LMGlobal -> Doc
- ppLlvmAlias :: LlvmAlias -> Doc
- ppLlvmAliases :: [LlvmAlias] -> Doc
- ppLlvmFunctionDecls :: LlvmFunctionDecls -> Doc
- ppLlvmFunctionDecl :: LlvmFunctionDecl -> Doc
- ppLlvmFunctions :: LlvmFunctions -> Doc
- ppLlvmFunction :: LlvmFunction -> Doc
- llvmSDoc :: SDoc -> Doc

# Top level LLVM objects.

ppLlvmModule :: LlvmModule -> Doc Source

Print out a whole LLVM module.

ppLlvmComments :: [LMString] -> Doc Source

Print out a multi-line comment, can be inside a function or on its own

ppLlvmComment :: LMString -> Doc Source

Print out a comment, can be inside a function or on its own

ppLlvmGlobals :: [LMGlobal] -> Doc Source

Print out a list of global mutable variable definitions

ppLlvmGlobal :: LMGlobal -> Doc Source

Print out a global mutable variable definition

ppLlvmAlias :: LlvmAlias -> Doc Source

Print out an LLVM type alias.

ppLlvmAliases :: [LlvmAlias] -> Doc Source

Print out a list of LLVM type aliases.

ppLlvmFunctionDecls :: LlvmFunctionDecls -> Doc Source

Print out a list of function declaration.

ppLlvmFunctionDecl :: LlvmFunctionDecl -> Doc Source

Print out a function declaration. Declarations define the function type but don't define the actual body of the function.

ppLlvmFunctions :: LlvmFunctions -> Doc Source

Print out a list of function definitions.

ppLlvmFunction :: LlvmFunction -> Doc Source

Print out a function definition.

# Utility functions

llvmSDoc :: SDoc -> Doc Source

Convert SDoc to Doc