From 26089c494f0d6fa8d4afeab2e2e53b25d299bb9f Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 31 Dec 2018 17:44:17 +0000 Subject: gdb: Remove final cleanup from find_overload_match This patch removes the setup of a null_cleanup in valops.c:find_overload_match, and all the calls to do_cleanups. gdb/ChangeLog: * valops.c (find_overload_match): Remove use of null_cleanup, and calls to do_cleanups. --- gdb/valops.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gdb/valops.c') diff --git a/gdb/valops.c b/gdb/valops.c index 1a9d6a6..75ff705 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2516,8 +2516,6 @@ find_overload_match (gdb::array_view args, struct type *basetype = NULL; LONGEST boffset; - struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); - const char *obj_type_name = NULL; const char *func_name = NULL; gdb::unique_xmalloc_ptr temp_func; @@ -2547,7 +2545,6 @@ find_overload_match (gdb::array_view args, if (*valp) { *staticp = 1; - do_cleanups (all_cleanups); return 0; } } @@ -2693,7 +2690,6 @@ find_overload_match (gdb::array_view args, if (func_name == NULL) { *symp = fsym; - do_cleanups (all_cleanups); return 0; } @@ -2820,8 +2816,6 @@ find_overload_match (gdb::array_view args, *objp = temp; } - do_cleanups (all_cleanups); - switch (match_quality) { case INCOMPATIBLE: -- cgit v1.1