Use std::move in a few places
authorTom Tromey <tom@tromey.com>
Fri, 11 Aug 2017 16:14:16 +0000 (10:14 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 14 Aug 2017 14:24:15 +0000 (08:24 -0600)
This patch adds std::move to few spots where it seems to be missing.

Regression tested by the buildbot.

ChangeLog
2017-08-14  Tom Tromey  <tom@tromey.com>

* break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
* break-catch-syscall.c (create_syscall_event_catchpoint): Use
std::move.
* break-catch-sig.c (create_signal_catchpoint): Use std::move.

gdb/ChangeLog
gdb/break-catch-sig.c
gdb/break-catch-syscall.c
gdb/break-catch-throw.c

index c5882914272360859c6230af98423a23714086b3..384d4d305b632a531d5166fab9509fd94c2ac0a8 100644 (file)
@@ -1,3 +1,10 @@
+2017-08-14  Tom Tromey  <tom@tromey.com>
+
+       * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
+       * break-catch-syscall.c (create_syscall_event_catchpoint): Use
+       std::move.
+       * break-catch-sig.c (create_signal_catchpoint): Use std::move.
+
 2017-08-11  Pedro Alves  <palves@redhat.com>
 
        * infrun.c (process_event_stop_test): Adjust
index c8529de8ad422ffc3ece8e90ac67fa51b7e54487..98888c9f30c961d05fbf8e6cbc7e51f41d88b156 100644 (file)
@@ -322,7 +322,7 @@ create_signal_catchpoint (int tempflag, std::vector<gdb_signal> &&filter,
 
   c = new signal_catchpoint ();
   init_catchpoint (c, gdbarch, tempflag, NULL, &signal_catchpoint_ops);
-  c->signals_to_be_caught = filter;
+  c->signals_to_be_caught = std::move (filter);
   c->catch_all = catch_all;
 
   install_breakpoint (0, c, 1);
index 58fc279440e3f3e0bd64a615f4cb9bdbe7bf9a8c..701645e9bc209aa596dce208bca6805bc0568828 100644 (file)
@@ -375,7 +375,7 @@ create_syscall_event_catchpoint (int tempflag, std::vector<int> &&filter,
 
   c = new syscall_catchpoint ();
   init_catchpoint (c, gdbarch, tempflag, NULL, ops);
-  c->syscalls_to_be_caught = filter;
+  c->syscalls_to_be_caught = std::move (filter);
 
   install_breakpoint (0, c, 1);
 }
index e71a885c4f20ba1c718e0ab43c13421c9cc20378..5318e5f9a653eec49dc720ed13161ec4f2e980f8 100644 (file)
@@ -382,7 +382,7 @@ handle_gnu_v3_exceptions (int tempflag, std::string &&except_rx,
      the right thing.  */
   cp->type = bp_breakpoint;
   cp->kind = ex_event;
-  cp->exception_rx = except_rx;
+  cp->exception_rx = std::move (except_rx);
   cp->pattern = std::move (pattern);
 
   re_set_exception_catchpoint (cp.get ());