Function get_next_use

Source
pub fn get_next_use(u: &UseRef) -> Option<UseRef>
Expand description

Obtain the next use of a value.

This effectively advances the iterator. It returns NULL if you are on the final use and no more are available.

§Details

Obtains the next use of a value in the LLVM IR.

This function wraps the LLVMGetNextUse function from the LLVM core library. It advances the iterator of uses for a value, returning the next use after the provided UseRef. If there are no more uses, it returns None. This function is used in conjunction with get_first_use to iterate over all uses of a value in LLVM IR.

§Parameters

  • u: A reference to the current UseRef from which to obtain the next use.

§Returns

Returns an Option<UseRef>:

  • Some(UseRef) if there is a subsequent use associated with the value.
  • None if there are no more uses associated with the value.