From 54f70bc14586878ee14891ecb11efb8a90405874 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 16 Oct 2017 17:26:09 -0600 Subject: Remove cleanups from prepare_execute_command This changes prepare_execute_command to return a scoped_value_mark rather than a cleanup. ChangeLog 2017-10-19 Tom Tromey * mi/mi-main.c (mi_cmd_execute): Update. * top.h (prepare_execute_command): Return scoped_value_mark. * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN. Add move constructor. * top.c (prepare_execute_command): Return scoped_value_mark. (execute_command): Update. --- gdb/value.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/value.h') diff --git a/gdb/value.h b/gdb/value.h index bc97ec0..fb6f81f 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -730,6 +730,10 @@ class scoped_value_mark free_to_mark (); } + scoped_value_mark (scoped_value_mark &&other) = default; + + DISABLE_COPY_AND_ASSIGN (scoped_value_mark); + /* Free the values currently on the value stack. */ void free_to_mark () { -- cgit v1.1