pub fn set_initializer(val: &ValueRef, constant_val: &ValueRef)
Expand description
Sets the initializer for a global variable.
This function wraps the LLVMSetInitializer
function from the LLVM core library. It assigns the provided constant value
as the initializer for the global variable represented by ValueRef
. The initializer is a constant value that the global
variable will be set to when the program starts. Only constant values can be used as initializers for global variables.
ยงParameters
constant_val
: A reference to the constant value (ValueRef
) that will be used as the initializer for the global variable.