getCallingConv: Get and set the calling convention for a routine

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

1

Arguments

fun

the LLVM Function object

Value

getCallingConv returns an enumerated constant identifying the specific calling convention.

Author(s)

Duncan Temple Lang

References

LLVM documentation

See Also

Function

Examples

1
2
3
4
5
6
7
8
 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)

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