2.5.1 Params

C Type: gcc_jit_param

A gcc_jit_param represents a parameter to a function.

C Function: gcc_jit_param * gcc_jit_context_new_param (gcc_jit_context *ctxt, gcc_jit_location *loc, gcc_jit_type *type, const char *name)

In preparation for creating a function, create a new parameter of the given type and name.

The parameter type must be non-void.

The parameter name must be non-NULL. The call takes a copy of the underlying string, so it is valid to pass in a pointer to an on-stack buffer.

Parameters are lvalues, and thus are also rvalues (and objects), so the following upcasts are available:

C Function: gcc_jit_lvalue * gcc_jit_param_as_lvalue (gcc_jit_param *param)

Upcasting from param to lvalue.

C Function: gcc_jit_rvalue * gcc_jit_param_as_rvalue (gcc_jit_param *param)

Upcasting from param to rvalue.

C Function: gcc_jit_object * gcc_jit_param_as_object (gcc_jit_param *param)

Upcasting from param to object.