@@ -1486,6 +1486,13 @@ recording::context::get_str_option (enum gcc_jit_str_option opt)
14861486 return m_str_options[opt];
14871487}
14881488
1489+ void
1490+ recording::context::set_output_ident (const char *ident)
1491+ {
1492+ recording::output_ident *memento = new output_ident (this , ident);
1493+ record (memento);
1494+ }
1495+
14891496/* Set the given integer option for this context, or add an error if
14901497 it's not recognized.
14911498
@@ -2326,6 +2333,52 @@ recording::string::write_reproducer (reproducer &)
23262333 /* Empty. */
23272334}
23282335
2336+ /* The implementation of class gcc::jit::recording::output_ident. */
2337+
2338+ /* Constructor for gcc::jit::recording::output_ident, allocating a
2339+ copy of the given text using new char[]. */
2340+
2341+ recording::output_ident::output_ident (context *ctxt, const char *ident)
2342+ : memento (ctxt)
2343+ {
2344+ m_ident = ident ? xstrdup (ident) : NULL ;
2345+ }
2346+
2347+ /* Destructor for gcc::jit::recording::output_ident. */
2348+
2349+ recording::output_ident::~output_ident ()
2350+ {
2351+ free (m_ident);
2352+ }
2353+
2354+ /* Implementation of pure virtual hook recording::memento::replay_into
2355+ for recording::output_ident. */
2356+
2357+ void
2358+ recording::output_ident::replay_into (replayer *r)
2359+ {
2360+ r->set_output_ident (m_ident);
2361+ }
2362+
2363+ /* Implementation of recording::memento::make_debug_string for output_ident. */
2364+
2365+ recording::string *
2366+ recording::output_ident::make_debug_string ()
2367+ {
2368+ return m_ctxt->new_string (m_ident);
2369+ }
2370+
2371+ /* Implementation of recording::memento::write_reproducer for output_ident. */
2372+
2373+ void
2374+ recording::output_ident::write_reproducer (reproducer &r)
2375+ {
2376+ r.write (" gcc_jit_context_set_output_ident (%s, \" %s\" );" ,
2377+ r.get_identifier (get_context ()),
2378+ m_ident);
2379+ }
2380+
2381+
23292382/* The implementation of class gcc::jit::recording::location. */
23302383
23312384/* Implementation of recording::memento::replay_into for locations.
0 commit comments