These functions allow us to create constants in LLVM code. There are functions for the different common types.
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)
the value of the constant. This can be a literal in R
the LLVMContext
the type for this constant. This should be an object of
class Value-class
.
the IRBuilder object
additional parameters for the specific methods
LLVM Documentation http://llvm.org/docs/