Function const_neg

Source
pub fn const_neg(val: &ValueRef) -> ValueRef
Expand description

Create a negation operation on a constant value.

§Details

Creates a new constant integer value representing the arithmetic negation of the original value.

This function wraps the LLVMConstNeg function from the LLVM core library, which computes the negation of the given constant value ValueRef.

§Returns

Returns a new constant integer value representing the result of the negation operation ValueRef.