llvm::APInt::abs

Return the absolute value of this APInt.

Synopsis

Declared in <llvm/ADT/APInt.h>

APInt
abs() const;

Description

If *this is < 0 then return -(*this), otherwise *this. Note that the "most negative" signed number (e.g. -128 for 8 bit wide APInt) is unchanged due to how negation works.

Return Value

The absolute value of this APInt.