Rllvm (version 0.7-0)

createLogicalConstant: Create constants in native code

Description

These functions allow us to create constants in LLVM code. There are functions for the different common types.

Usage

createLogicalConstant(val, context = getGlobalContext())
createConstant(builder, val, type = NULL,
               context = if(!missing(builder)) 
                        as(builder, "LLVMContext") 
                     else
                        getGlobalContext())
createIntegerConstant(val, context = getGlobalContext(), ...)
createFloatingPointConstant(val, context, type)

Arguments

val

the value of the constant. This can be a literal in R

context

the LLVMContext

type

the type for this constant. This should be an object of class Value-class.

builder

the IRBuilder object

additional parameters for the specific methods

References

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