Function const_pointer_null

Source
pub fn const_pointer_null(ty: &TypeRef) -> ValueRef
Expand description

Obtain a constant that is a constant pointer pointing to NULL for a specified type.

§Details

Creates a constant null pointer value of the specified pointer type.

This function wraps the LLVMConstPointerNull function from the LLVM core library. It generates a constant null pointer for the specified pointer type (ty). This is typically used to represent a pointer that does not point to any valid memory location within LLVM IR.

§Parameters

  • ty: A reference to the pointer type (TypeRef) for which the null pointer value should be created. This type must be a pointer type.

§Returns

Returns an instance of ValueRef, which encapsulates the constant null pointer value for the specified type.