pub fn const_all_ones(ty: &TypeRef) -> ValueRef
Expand description
Obtain a constant value referring to the instance of a type consisting of all ones.
This is only valid for integer types.
§Details
Creates a constant value with all bits set to one for the specified type.
This function wraps the LLVMConstAllOnes
function from the LLVM core library. It generates a constant value
for the specified type (ty
) where all the bits are set to one. This is often used to represent a value where
all bits are enabled, such as -1
for signed integers or the maximum possible value for unsigned integers.
§Parameters
ty
: A reference to the type (TypeRef
) for which the all-ones value should be created. This type determines the size and nature of the value (e.g., integer, vector).
§Returns
Returns an instance of ValueRef
, which encapsulates the constant all-ones value for the specified type.