These functions relate to passing aggregate objects in LLVM calls. In some cases, we pass the structure by value and not by reference. We need to indicate this by declaring specific parameters as pass-by-value (ByVal). LLVM will take care of passing the resulting object by value. These functions allow us to specify a parameter should be marked as pass-by-value and also querying if a parameter/argument is pass-by-value.
setArgByVal(call, paramNum)
hasByValAttr(x, ...)
byVal(x, ...)
the CallInst
object representing the low-level call
or LLVM Function
object
the index (starting at 1) of the argument of interest
the argument in a call.
additional parameters for a generic version of this function
hasByValAttr
returns a logical value.
setArgByVal
returns NULL
LLVM documentation