lapplyDebugInfo: Query the Debug Information in an LLVM Module

View source: R/debugInfo.R

lapplyDebugInfoR Documentation

Query the Debug Information in an LLVM Module

Usage

lapplyDebugInfo(mod, fun, setClass = TRUE, ...)
lapplyDebugInfoTypes(mod, fun, setClass = TRUE, ...) 
getElements(x, ...)

Arguments

mod

the Module-class whose debugging metadata to query

fun

a function that is applied to each top-level metadata node or metadata type in the module.

setClass

a logical value that controls whether to get the specific class of the DINode/DIType object, or to leave it as a generic DINode/DIType class.

...

additional arguments. Currently ignored. Instead of passing values by this mechanism, create an anonymous function that includes these arguments in the call to the actual function

x

the debug type object, i.e. one of the sub-classes of DIType, specifically DICompositeType as these are the ones that have elements. If a DIDerivedType is passed, getElements gets the base type and if that is a DICompositeType, returns its elements.

Value

A list

Note

lapplyDebugInfo doesn't return the nodes as they currently are on the stack and so will disappear if we take a reference to them.

Author(s)

DTL

See Also

getElements

Examples

f = system.file("IR/fib_debug.ir", package = "Rllvm")
m = parseIR(f)
lapplyDebugInfo(m, class)
lapplyDebugInfoTypes(m, class)
lapplyDebugInfoTypes(m, getElements)

duncantl/Rllvm documentation built on April 23, 2024, 6:14 p.m.