Get the element type of an array type or NULL if it’s not an array.
Return non-zero if the type is a bool.
Return the function type if it is one or NULL.
Given a function type, return its return type.
Given a function type, return its number of parameters.
Given a function type, return the type of the specified parameter.
Return non-zero if the type is an integral.
Return the type pointed by the pointer type or NULL if it’s not a pointer.
Given a type, return a dynamic cast to a vector type or NULL.
Given a type, return a dynamic cast to a struct type or NULL.
Given a vector type, return the number of units it contains.
Given a vector type, return the type of its elements.
Given a type, return the unqualified type, removing “const”, “volatile” and alignment qualifiers.
Get a struct field by index.
Get the number of fields in the struct.
The API entrypoints related to the reflection API:
- gcc_jit_function_type_get_return_type()
- gcc_jit_function_type_get_param_count()
- gcc_jit_function_type_get_param_type()
- gcc_jit_type_unqualified()
- gcc_jit_type_dyncast_array()
- gcc_jit_type_is_bool()
- gcc_jit_type_dyncast_function_ptr_type()
- gcc_jit_type_is_integral()
- gcc_jit_type_is_pointer()
- gcc_jit_type_dyncast_vector()
- gcc_jit_vector_type_get_element_type()
- gcc_jit_vector_type_get_num_units()
- gcc_jit_struct_get_field()
- gcc_jit_type_is_struct()
- gcc_jit_struct_get_field_count()
were added in LIBGCCJIT_ABI_16; you can test for their presence using
#ifdef LIBGCCJIT_HAVE_REFLECTION
Return non-zero if the two types are compatible. For instance, if
GCC_JIT_TYPE_UINT64_T
andGCC_JIT_TYPE_UNSIGNED_LONG
are the same size on the target, this will return non-zero. The parametersltype
andrtype
must be non-NULL. Return 0 on errors.
This entrypoint was added in LIBGCCJIT_ABI_20; you can test for its presence using
#ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS
Return the size of a type, in bytes. It only works on integer types for now. The parameter
type
must be non-NULL. Return -1 on errors.
This entrypoint was added in LIBGCCJIT_ABI_20; you can test for its presence using
#ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS