Remove make_cleanup_restore_current_language
authorTom Tromey <tom@tromey.com>
Thu, 27 Apr 2017 04:41:30 +0000 (22:41 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 3 Aug 2017 13:58:58 +0000 (07:58 -0600)
commite3ad2841b1c75837a901618651fed23013643e3f
tree8bd5273ccd8abe8528e2b280ab67992bfa61ad28
parentb80cf838447322778f04059a1f58b78ffbbeb597
Remove make_cleanup_restore_current_language

This patch replaces make_cleanup_restore_current_language with an RAII
class that saves the current language, and restores it when the object
is destroyed.

ChangeLog
2017-08-03  Tom Tromey  <tom@tromey.com>

* utils.h (make_cleanup_restore_current_language): Remove.
* utils.c (do_restore_current_language)
(make_cleanup_restore_current_language): Remove.
* parse.c (parse_exp_in_context_1)
(parse_expression_with_language): Use
scoped_restore_current_language.
* mi/mi-main.c (mi_cmd_execute): Use
scoped_restore_current_language.
* language.h (scoped_restore_current_language): New class.
gdb/ChangeLog
gdb/language.h
gdb/mi/mi-main.c
gdb/parse.c
gdb/utils.c
gdb/utils.h