Function const_xor

Source
pub fn const_xor(lhs: &ValueRef, rhs: &ValueRef) -> ValueRef
Expand description

Create a logical XOR operation on two constant values.

§Details

Creates a new constant integer value representing the bitwise XOR (exclusive OR) of two constant integer values.

This function wraps the LLVMConstXor function from the LLVM core library, which performs the bitwise XOR operation between two constant integer values and returns the result as a new constant value. The XOR operation compares each corresponding bit of the two values, setting the resulting bit to 1 if the bits differ, and to 0 if they are the same.

§Arguments

  • lhs - A reference to the left-hand side (LHS) constant integer value.
  • rhs - A reference to the right-hand side (RHS) constant integer value.

§Returns

Returns a new constant integer value representing the result of the bitwise XOR operation between lhs and rhs.