License | BSD3 |
---|---|
Stability | provisional |
Safe Haskell | None |
Language | Haskell2010 |
Point-of-contact : emertens
Synopsis
- data Info
- computeFunctionTypes :: Module -> Symbol -> Maybe [Info]
- valMdToInfo :: MdMap -> ValMd -> Info
- localVariableNameDeclarations :: IntMap ValMd -> Define -> Map Ident Ident
- mkMdMap :: Module -> IntMap ValMd
- derefInfo :: Info -> Info
- fieldIndexByPosition :: Int -> Info -> Info
- fieldIndexByName :: String -> Info -> Maybe Int
- guessAliasInfo :: IntMap ValMd -> Ident -> Info
Definition type analyzer
:: 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 #
Metadata lookup
Type structure dereference
If the argument describes a pointer, return the information for the type that it points do. If the argument describes an array, return information about the element type.
:: 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.
:: 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.
Info hueristics
Search the metadata for debug info corresponding to a given type alias. This is considered a heuristic because there's no direct mapping between type aliases and debug info. The debug information must be search for a textual match.