Remove last cleanups from go-exp.y
authorTom Tromey <tom@tromey.com>
Sun, 13 Aug 2017 16:40:35 +0000 (10:40 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 6 Sep 2017 21:49:31 +0000 (15:49 -0600)
This removes the last remaining cleanups from go-exp.y.

2017-09-05  Tom Tromey  <tom@tromey.com>

* go-exp.y (go_parse): Don't create a cleanup.

gdb/ChangeLog
gdb/go-exp.y

index c8ba539f053eb0864c1ed909eefed3d34df7c24d..32c63795597e4b873ca192945df2ab1c931ca676 100644 (file)
@@ -1,3 +1,7 @@
+2017-09-05  Tom Tromey  <tom@tromey.com>
+
+       * go-exp.y (go_parse): Don't create a cleanup.
+
 2017-09-05  Tom Tromey  <tom@tromey.com>
 
        * d-exp.y (PrimaryExpression): Use std::string.
index 098e7340fcd9b41f5c83151ecd7ccb7aec83a2ef..629093a1187defca532f94ef319db4702b8babe5 100644 (file)
@@ -1560,18 +1560,11 @@ yylex (void)
 int
 go_parse (struct parser_state *par_state)
 {
-  int result;
-  struct cleanup *back_to;
-
   /* Setting up the parser state.  */
   scoped_restore pstate_restore = make_scoped_restore (&pstate);
   gdb_assert (par_state != NULL);
   pstate = par_state;
 
-  /* Note that parsing (within yyparse) freely installs cleanups
-     assuming they'll be run here (below).  */
-  back_to = make_cleanup (null_cleanup, NULL);
-
   scoped_restore restore_yydebug = make_scoped_restore (&yydebug,
                                                        parser_debug);
 
@@ -1583,9 +1576,7 @@ go_parse (struct parser_state *par_state)
   popping = 0;
   name_obstack.clear ();
 
-  result = yyparse ();
-  do_cleanups (back_to);
-  return result;
+  return yyparse ();
 }
 
 void
This page took 0.03611 seconds and 4 git commands to generate.