Remove make_cleanup_discard_psymtabs
[deliverable/binutils-gdb.git] / gdb / dwarf2read.c
index dfb79c9487c05ef1c377bfb0dece5e7bb523e921..b5dc510a35852bde9ec49c2d353ee8e2d7267b6d 100644 (file)
@@ -4271,10 +4271,9 @@ dwarf2_build_psymtabs (struct objfile *objfile)
       /* This isn't really ideal: all the data we allocate on the
         objfile's obstack is still uselessly kept around.  However,
         freeing it seems unsafe.  */
-      struct cleanup *cleanups = make_cleanup_discard_psymtabs (objfile);
-
+      psymtab_discarder psymtabs (objfile);
       dwarf2_build_psymtabs_hard (objfile);
-      discard_cleanups (cleanups);
+      psymtabs.keep ();
     }
   CATCH (except, RETURN_MASK_ERROR)
     {
This page took 0.032711 seconds and 4 git commands to generate.