Compilation results


A gcc_jit_result encapsulates the result of compiling a context.

gcc_jit_result * gcc_jit_context_compile(gcc_jit_context *ctxt)

This calls into GCC and builds the code, returning a gcc_jit_result *.

void * gcc_jit_result_get_code(gcc_jit_result *result, const char *funcname)

Locate a given function within the built machine code. This will need to be cast to a function pointer of the correct type before it can be called.

void gcc_jit_result_release(gcc_jit_result *result)

Once we’re done with the code, this unloads the built .so file. This cleans up the result; after calling this, it’s no longer valid to use the result.

Previous topic

Source Locations

Next topic