pub fn const_vector(scalar_constant_vals: &[ValueRef]) -> ValueRefExpand description
Create a ConstantVector from values.
§Details
Creates a constant vector value from an array of scalar constant values.
This function wraps the LLVMConstVector function from the LLVM core library. It generates a constant
vector using the provided array of scalar constant values (scalar_constant_vals). Each element in the array
corresponds to an element in the resulting vector, and the type of the vector is inferred from the types of the scalar constants.
§Parameters
scalar_constant_vals: A slice of scalar constant valuesValueRefthat will be used as the elements of the vector. Each element in this slice corresponds to an element in the resulting vector.
§Returns
Returns an instance of ValueRef, which encapsulates the constant vector value created from the specified scalar constants.