From e3ad2841b1c75837a901618651fed23013643e3f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 26 Apr 2017 22:41:30 -0600 Subject: 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 * 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/utils.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gdb/utils.h') diff --git a/gdb/utils.h b/gdb/utils.h index a6709c0..63cc475 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -113,8 +113,6 @@ extern struct cleanup *make_cleanup_value_free (struct value *); struct so_list; extern struct cleanup *make_cleanup_free_so (struct so_list *so); -extern struct cleanup *make_cleanup_restore_current_language (void); - /* A deleter for a hash table. */ struct htab_deleter { -- cgit v1.1