Don't allow copying of auto_obstack

Add DISABLE_COPY_AND_ASSIGN to struct auto_obstack, to prevent copying
it.  Copying an auto_obstack would be a bug.

2020-02-11  Tom Tromey  <tom@tromey.com>

	* gdb_obstack.h (struct auto_obstack): Use
	DISABLE_COPY_AND_ASSIGN.

Change-Id: Ic9e5ab20acfcfa61c241fed4d99bbb1caefba3cd
This commit is contained in:
Tom Tromey 2020-02-11 17:31:10 -07:00
parent 3fd6912bb1
commit f92ff6b552
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2020-02-11 Tom Tromey <tom@tromey.com>
* gdb_obstack.h (struct auto_obstack): Use
DISABLE_COPY_AND_ASSIGN.
2020-02-11 Tom Tromey <tom@tromey.com>
* dwarf2/frame.h (struct objfile): Don't forward declare.

View File

@ -125,6 +125,8 @@ struct auto_obstack : obstack
~auto_obstack ()
{ obstack_free (this, NULL); }
DISABLE_COPY_AND_ASSIGN (auto_obstack);
/* Free all memory in the obstack but leave it valid for further
allocation. */
void clear ()