A gccjit::location encapsulates a source code location, so that you can (optionally) associate locations in your language with statements in the JIT-compiled code, allowing the debugger to single-step through your language.
gccjit::location instances are optional: you can always omit them from any C++ API entrypoint accepting one.
You can construct them using gccjit;;context;;new_location().
You need to enable GCC_JIT_BOOL_OPTION_DEBUGINFO on the gccjit;;context for these locations to actually be usable by the debugger:
ctxt.set_bool_option (GCC_JIT_BOOL_OPTION_DEBUGINFO, 1);