@@ -4632,8 +4632,6 @@ recording::block::add_try_catch (location *loc,
46324632 bool is_finally)
46334633{
46344634 statement *result = new try_catch (this , loc, try_block, catch_block, is_finally);
4635- // try_block->m_has_been_terminated = true;
4636- // catch_block->m_has_been_terminated = true;
46374635 try_block->m_is_reachable = true ;
46384636 catch_block->m_is_reachable = true ;
46394637 m_ctxt->record (result);
@@ -7127,8 +7125,13 @@ recording::try_catch::replay_into (replayer *r)
71277125recording::string *
71287126recording::try_catch::make_debug_string ()
71297127{
7130- // TODO: handle m_is_finally.
7131- return string::from_printf (m_ctxt,
7128+ if (m_is_finally)
7129+ return string::from_printf (m_ctxt,
7130+ " try { %s } finally { %s };" ,
7131+ m_try_block->get_debug_string (),
7132+ m_catch_block->get_debug_string ());
7133+ else
7134+ return string::from_printf (m_ctxt,
71327135 " try { %s } catch { %s };" ,
71337136 m_try_block->get_debug_string (),
71347137 m_catch_block->get_debug_string ());
@@ -7140,11 +7143,14 @@ recording::try_catch::make_debug_string ()
71407143void
71417144recording::try_catch::write_reproducer (reproducer &r)
71427145{
7143- // TODO: handle m_is_finally.
7144- r.write (" gcc_jit_block_add_try_catch (%s, /*gcc_jit_block *block */\n "
7146+ const char *func_name = " gcc_jit_block_add_try_catch" ;
7147+ if (m_is_finally)
7148+ func_name = " gcc_jit_block_add_try_finally" ;
7149+ r.write (" %s (%s, /*gcc_jit_block *block */\n "
71457150 " %s, /* gcc_jit_location *loc */\n "
71467151 " %s, /* gcc_jit_block *try_block */\n "
71477152 " %s); /* gcc_jit_block *catch_block */\n " ,
7153+ func_name,
71487154 r.get_identifier (get_block ()),
71497155 r.get_identifier (get_loc ()),
71507156 r.get_identifier (m_try_block),
0 commit comments