diff options
author | Tom Tromey <tom@tromey.com> | 2017-08-13 10:37:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-09-06 15:49:30 -0600 |
commit | eae49211e13efa075d57ab354ea4207666eadc96 (patch) | |
tree | 6cbf8e62f73a076d795c0fb3aacd84487037cd9a /gdb/utils.c | |
parent | 73b9be8b5301c4ac056e10c38a47414867ee892a (diff) | |
download | gdb-eae49211e13efa075d57ab354ea4207666eadc96.zip gdb-eae49211e13efa075d57ab354ea4207666eadc96.tar.gz gdb-eae49211e13efa075d57ab354ea4207666eadc96.tar.bz2 |
Remove make_cleanup_clear_parser_state
This removes make_cleanup_clear_parser_state in favor of
scoped_restore.
2017-09-05 Tom Tromey <tom@tromey.com>
* utils.c (do_clear_parser_state): Remove.
(make_cleanup_clear_parser_state): Remove.
* p-exp.y (pascal_parse): Use scoped_restore.
* m2-exp.y (m2_parse): Use scoped_restore.
* f-exp.y (f_parse): Use scoped_restore.
* d-exp.y (d_parse): Use scoped_restore.
* c-exp.y (c_parse): Use scoped_restore.
* ada-exp.y (ada_parse): Use scoped_restore.
* utils.h (make_cleanup_clear_parser_state): Remove.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index af50cf0..f2da2df 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -257,24 +257,6 @@ make_cleanup_value_free (struct value *value) return make_cleanup (do_value_free, value); } -/* Helper function for make_cleanup_clear_parser_state. */ - -static void -do_clear_parser_state (void *ptr) -{ - struct parser_state **p = (struct parser_state **) ptr; - - *p = NULL; -} - -/* Clean (i.e., set to NULL) the parser state variable P. */ - -struct cleanup * -make_cleanup_clear_parser_state (struct parser_state **p) -{ - return make_cleanup (do_clear_parser_state, (void *) p); -} - /* This function is useful for cleanups. Do |