getDefinedRoutines: List the LLVM Functions that are defined in a given Module

getDefinedRoutinesR Documentation

List the LLVM Functions that are defined in a given Module

Description

This function examines an LLVM Module-class and returns a named list of the Function-class/routine objects that have a body, i.e., that are implemented in the module. This excludes the Function-class objects that are only declarations in the Module-class.

Usage

getDefinedRoutines(file, module = parseIR(file), names = TRUE, dropInternal = TRUE)

Arguments

file

either the path to a file containing the LLVM IR code or a Module-class object.

module

a Module-class object

names

a logical value controlling whether only the names of the defined routines are returned or the named-list of Function-class objects

dropInternal

a logical value controlling whether to omit routines whose names start with the . character.

Value

If names is TRUE, a character list containing the names of the routines. If names is FALSE, a named list whose elements are the LLVM Function-class objects

Author(s)

Duncan Temple Lang

See Also

parseIR, Module

Examples

 f = system.file("IR", "fib.ir", package = "Rllvm")
 r = getDefinedRoutines(f, names = FALSE)
 names(r)

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