9 create_code (gcc_jit_context
*ctxt
, void *user_data
)
11 /* Let's try to inject the equivalent of:
16 and verify that the API complains about the lack of
19 gcc_jit_type
*int_type
=
20 gcc_jit_context_get_type (ctxt
, GCC_JIT_TYPE_INT
);
22 (void)gcc_jit_context_new_function (ctxt
, NULL
,
23 GCC_JIT_FUNCTION_EXPORTED
,
31 verify_code (gcc_jit_context
*ctxt
, gcc_jit_result
*result
)
33 CHECK_VALUE (result
, NULL
);
35 /* Verify that the correct error message was emitted. */
36 CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt
),
37 "function test_fn returns non-void (type: int)"
38 " but has no blocks");