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:
parent
3fd6912bb1
commit
f92ff6b552
|
@ -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>
|
2020-02-11 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* dwarf2/frame.h (struct objfile): Don't forward declare.
|
* dwarf2/frame.h (struct objfile): Don't forward declare.
|
||||||
|
|
|
@ -125,6 +125,8 @@ struct auto_obstack : obstack
|
||||||
~auto_obstack ()
|
~auto_obstack ()
|
||||||
{ obstack_free (this, NULL); }
|
{ obstack_free (this, NULL); }
|
||||||
|
|
||||||
|
DISABLE_COPY_AND_ASSIGN (auto_obstack);
|
||||||
|
|
||||||
/* Free all memory in the obstack but leave it valid for further
|
/* Free all memory in the obstack but leave it valid for further
|
||||||
allocation. */
|
allocation. */
|
||||||
void clear ()
|
void clear ()
|
||||||
|
|
Loading…
Reference in New Issue