Learn R Programming

Rllvm (version 0.7-0)

declareFunction: 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.

References

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