declareFunction: Declare a function in a module

View source: R/declareFunction.R

declareFunctionR Documentation

Declare a function in a module

Description

This function slightly simplifies declaring a function/routine to a module so that it can be referenced in the instructions we create. This is for an external routine, e.g. in a 3rd party library, or one that we will define later.

Usage

declareFunction(def, name, mod, linkage = ExternalLinkage)

Arguments

def

the function description which is either a list with two elements giving the returnType and parameter types or a flat list of all the types with the first one being the return type

name

the name of the function

mod

the module in which to declare the function

linkage

whether the routine is external or static or whatever type of linkage.

Author(s)

DTL

References

LLVM Documentation http://llvm.org/docs/


duncantl/Rllvm documentation built on Nov. 23, 2023, 4:24 p.m.