pub fn get_operand_use(val: &ValueRef, index: u32) -> Option<UseRef>
Expand description
Obtain the use of an operand at a specific index in a LLVM User
value.
§Details
Retrieves the use of an operand at a specified index from a value in LLVM IR.
This function wraps the LLVMGetOperandUse
function from the LLVM core library. It returns the UseRef
associated with the operand at the specified index (index
) from the value represented by ValueRef
. In LLVM IR,
a “use” refers to an instance where an operand is used by an instruction or another value. If the index is out of
bounds or the operand use cannot be retrieved, the function returns None
.
§Parameters
index
: The index of the operand use to retrieve. This index should be within the bounds of the number of operands the value has.
§Returns
Returns an Option<UseRef>
:
Some(UseRef)
containing the retrieved operand use if the index is valid and the operand use is found.None
if the index is out of bounds or the operand use cannot be retrieved.