Learn R Programming

Rllvm (version 0.7-0)

getCallingConv: Get and set the calling convention for a routine

Description

These functions allow us to specify and query the calling convention of an LLVM routine.

Usage

getCallingConv(fun)

Arguments

fun

the LLVM Function object

Value

getCallingConv returns an enumerated constant identifying the specific calling convention.

References

LLVM documentation

See Also

Function

Examples

Run this code
# NOT RUN {
 f = Function("foo", Int32Type, list(x = Int32Type, y = DoubleType))
 getCallingConv(f)

 setCallingConv(f, 'Fast')

 f = Function("kernel", VoidType, list(n = Int32Type, x = FloatPtrType, out = FloatPtrType))
 setCallingConv(f, 'PTX_Kernel')
 showModule(f)
# }

Run the code above in your browser using DataLab