3.2.5.2 Functions ¶
- C++ Class: gccjit::function ¶
-
A gccjit::function represents a function - either one that we’re
creating ourselves, or one that we’re referencing.
- C++ Function: gccjit::function gccjit::context::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char *name, std::vector<param> ¶ms, int is_variadic, gccjit::location loc) ¶
-
Create a gcc_jit_function with the given name and parameters.
Parameters “is_variadic” and “loc” are optional.
This is a wrapper around the C API’s gcc_jit_context_new_function().
- C++ Function: gccjit::function gccjit::context::get_builtin_function (const char *name) ¶
-
This is a wrapper around the C API’s
gcc_jit_context_get_builtin_function().
- C++ Function: gccjit::param gccjit::function::get_param (int index) const ¶
-
Get the param of the given index (0-based).
- C++ Function: void gccjit::function::dump_to_dot (const char *path) ¶
-
Emit the function in graphviz format to the given path.
- C++ Function: gccjit::lvalue gccjit::function::new_local (gccjit::type type, const char *name, gccjit::location loc) ¶
-
Create a new local variable within the function, of the given type and
name.