forked from Imagelibrary/binutils-gdb
Change increment_reading_symtab to return a scoped_restore
This changes increment_reading_symtab to return a scoped_restore, then fixes up the users. gdb/ChangeLog 2017-04-12 Tom Tromey <tom@tromey.com> * symfile.h (increment_reading_symtab): Update type. * symfile.c (decrement_reading_symtab): Remove. (increment_reading_symtab): Return a scoped_restore_tmpl<int>. * psymtab.c (psymtab_to_symtab): Update. * dwarf2read.c (dw2_instantiate_symtab): Update.
This commit is contained in:
@@ -770,10 +770,9 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
/* If it has not yet been read in, read it. */
|
||||
if (!pst->readin)
|
||||
{
|
||||
struct cleanup *back_to = increment_reading_symtab ();
|
||||
scoped_restore decrementer = increment_reading_symtab ();
|
||||
|
||||
(*pst->read_symtab) (pst, objfile);
|
||||
do_cleanups (back_to);
|
||||
}
|
||||
|
||||
return pst->compunit_symtab;
|
||||
|
||||
Reference in New Issue
Block a user