aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2018-12-31 17:44:17 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-01-03 21:24:01 +0000
commit26089c494f0d6fa8d4afeab2e2e53b25d299bb9f (patch)
tree4b4c2614dce17babacfca2d22d67e24e4341b788
parent06d3e5b0046d69e3da3450d2eb07c29f0c1a189a (diff)
downloadgdb-26089c494f0d6fa8d4afeab2e2e53b25d299bb9f.zip
gdb-26089c494f0d6fa8d4afeab2e2e53b25d299bb9f.tar.gz
gdb-26089c494f0d6fa8d4afeab2e2e53b25d299bb9f.tar.bz2
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/valops.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3e677dc..e3c4c53 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
+ * valops.c (find_overload_match): Remove use of null_cleanup, and
+ calls to do_cleanups.
+
+2019-01-03 Andrew Burgess <andrew.burgess@embecosm.com>
+
* compile/compile-cplus-types.c
(compile_cplus_instance::decl_name): Handle changes to
cp_func_name.
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<value *> 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<char> temp_func;
@@ -2547,7 +2545,6 @@ find_overload_match (gdb::array_view<value *> args,
if (*valp)
{
*staticp = 1;
- do_cleanups (all_cleanups);
return 0;
}
}
@@ -2693,7 +2690,6 @@ find_overload_match (gdb::array_view<value *> args,
if (func_name == NULL)
{
*symp = fsym;
- do_cleanups (all_cleanups);
return 0;
}
@@ -2820,8 +2816,6 @@ find_overload_match (gdb::array_view<value *> args,
*objp = temp;
}
- do_cleanups (all_cleanups);
-
switch (match_quality)
{
case INCOMPATIBLE: