Make SJLJ exceptions more efficient
authorTom Tromey <tromey@adacore.com>
Tue, 23 Apr 2019 13:29:49 +0000 (07:29 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 25 Apr 2019 18:59:35 +0000 (12:59 -0600)
commitc6fdd8b2052baa9b7a27d4d34f109c9622b53509
tree98fecba5793b6509802d1f653f4f5c8f46ee3463
parentcc06b668978e542ecbc2aff1beca40e5baff86b0
Make SJLJ exceptions more efficient

This changes the SJLJ exception handling code to be a bit more
efficient, by using rvalue references and move assignment when
possible.

Tested by the buildbot.

gdb/ChangeLog
2019-04-25  Tom Tromey  <tromey@adacore.com>

* event-top.c (gdb_rl_callback_read_char_wrapper_noexcept)
(gdb_rl_callback_handler): Use std::move.
* common/common-exceptions.h (struct gdb_exception): Add move
assignment operator.
(throw_exception_sjlj): Change "exception" to const reference.
* common/common-exceptions.c (exceptions_state_mc_catch): Update.
(throw_exception_sjlj): Change "exception" to const reference.
gdb/ChangeLog
gdb/common/common-exceptions.c
gdb/common/common-exceptions.h
gdb/event-top.c