diff options
author | Tom Tromey <tom@tromey.com> | 2020-02-11 17:31:10 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-02-11 17:57:46 -0700 |
commit | f92ff6b55219a7c4c54a62412e194bbda713cf46 (patch) | |
tree | 75f1ddff6f0afd3b60a093a659156c88ddbc20f2 /gdb/gdb_obstack.h | |
parent | 3fd6912bb1066ae047de2ade1201a823f366fc8e (diff) | |
download | binutils-f92ff6b55219a7c4c54a62412e194bbda713cf46.zip binutils-f92ff6b55219a7c4c54a62412e194bbda713cf46.tar.gz binutils-f92ff6b55219a7c4c54a62412e194bbda713cf46.tar.bz2 |
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
Diffstat (limited to 'gdb/gdb_obstack.h')
-rw-r--r-- | gdb/gdb_obstack.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/gdb_obstack.h b/gdb/gdb_obstack.h index fb9295f..9b1d907 100644 --- a/gdb/gdb_obstack.h +++ b/gdb/gdb_obstack.h @@ -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 () |