gdb: Remove final cleanup from find_overload_match
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 31 Dec 2018 17:44:17 +0000 (17:44 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 3 Jan 2019 21:24:01 +0000 (21:24 +0000)
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/ChangeLog
gdb/valops.c

index 3e677dcde2bbcda88121a9c8c1f4553d069e64a1..e3c4c533bed4ca6a2817aa598fd4e4bfa7b94598 100644 (file)
@@ -1,3 +1,8 @@
+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
index 1a9d6a6f95838c5ebac5f081fd4f215cf0484ed6..75ff7058b7c0de0f1d924dcec5c7c918c18ea17b 100644 (file)
@@ -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:
This page took 0.126271 seconds and 4 git commands to generate.