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

LicenseBSD3
Stabilityprovisional
Safe HaskellSafe
LanguageHaskell2010

Text.LLVM.DebugUtils

Contents

Description

Point-of-contact : emertens

Synopsis

Definition type analyzer

data Info Source #

Instances

computeFunctionTypes Source #

Arguments

:: Module

module to search

-> Symbol

function symbol

-> Maybe [Info]

return and argument type information

Compute the structures of a function's return and argument types using DWARF information metadata of the LLVM module. Different versions of LLVM make this information available via different paths. This function attempts to support the variations.

valMdToInfo :: MdMap -> ValMd -> Info Source #

localVariableNameDeclarations Source #

Arguments

:: IntMap ValMd

unnamed metadata

-> Define

function definition

-> Map Ident Ident

raw name, actual name

Metadata lookup

mkMdMap :: Module -> IntMap ValMd Source #

Compute an IntMap of the unnamed metadata in a module

Type structure dereference

derefInfo Source #

Arguments

:: Info

pointer type information

-> Info

type information of pointer's base type

If the argument describes a pointer, return the information for the type that it points do.

fieldIndexByPosition Source #

Arguments

:: Int

zero-based field index

-> Info

composite type information

-> Info

type information for specified field

If the argument describes a composite type, returns the type of the field by zero-based index into the list of fields.

fieldIndexByName Source #

Arguments

:: String

field name

-> Info

composite type info

-> Maybe Int

zero-based index of field matching the name

If the argument describes a composite type, return the first, zero-based index of the field in that type that matches the given name.