3.2.2 Objects

C++ Class: gccjit::object

Almost every entity in the API (with the exception of gccjit;;context and gcc_jit_result *) is a “contextual” object, a gccjit;;object.

A JIT object:

The C++ class hierarchy within the gccjit namespace looks like this:

+- object
    +- location
    +- type
       +- struct
    +- field
    +- function
    +- block
    +- rvalue
        +- lvalue
           +- param
    +- case_

The gccjit;;object base class has the following operations:

C++ Function: gccjit::context gccjit::object::get_context () const

Which context is the obj within?

C++ Function: std::string gccjit::object::get_debug_string () const

Generate a human-readable description for the given object.

For example,

printf ("obj: %s\n", obj.get_debug_string ().c_str ());

might give this text on stdout:

obj: 4.0 * (float)i