Function set_operand

Source
pub fn set_operand(val1: &mut ValueRef, index: u32, val2: &ValueRef)
Expand description

Set an operand at a specific index in a LLVM User value.

§Details

Sets the value of an operand at a specified index for a value in LLVM IR.

This function wraps the LLVMSetOperand function from the LLVM core library. It assigns a new value (val) to the operand at the specified index (index) for the value represented by ValueRef. This allows modification of the operands of an instruction or another value within LLVM IR.

§Parameters

  • index: The index of the operand to set. This index should be within the bounds of the number of operands the value has.
  • val: A reference to the new value (ValueRef) that will be assigned to the operand at the specified index.