declareFunction: Declare a function in a module

Description Usage Arguments Author(s) References

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

1
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/


doktorschiwago/Rllvm2 documentation built on May 15, 2019, 9:42 a.m.