aboutsummaryrefslogtreecommitdiff
path: root/gdb/extension.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-01-07 09:25:33 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2018-01-07 09:25:33 -0500
commitf979c73fd0be9a8a683f79af40c7b939c2a65d9f (patch)
treebd3778595c1cf1ad5659e43435e329027f095a84 /gdb/extension.h
parentba18742c3a1b62ff218db99bee47bb932af6dab9 (diff)
downloadbinutils-f979c73fd0be9a8a683f79af40c7b939c2a65d9f.zip
binutils-f979c73fd0be9a8a683f79af40c7b939c2a65d9f.tar.gz
binutils-f979c73fd0be9a8a683f79af40c7b939c2a65d9f.tar.bz2
Remove xmethod_worker::clone
I think that the clone method of xmethod_worker can be removed. It is only used in find_overload_match, to clone an xmethod we want to keep. Instead, we can just std::move it out of the vector and into value_from_xmethod. value_from_xmethod creates a value that will own the xmethod_worker from that point. Other xmethod_workers left in the vector will get destroyed when the vector gets destroyed, but the chosen one will keep living inside the value struct. gdb/ChangeLog: * extension.h (struct xmethod_worker) <clone>: Remove. * python/py-xmethods.c (struct python_xmethod_worker) <clone>: Remove. (python_xmethod_worker::clone): Remove. * valops.c (find_overload_match): Use std::move instead of clone.
Diffstat (limited to 'gdb/extension.h')
-rw-r--r--gdb/extension.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/gdb/extension.h b/gdb/extension.h
index 475d712..effa5bb 100644
--- a/gdb/extension.h
+++ b/gdb/extension.h
@@ -182,13 +182,6 @@ struct xmethod_worker
virtual value *invoke (value *obj, value **args, int nargs) = 0;
- /* Clone this worker, returns a new but identical worker.
- The function get_matching_xmethod_workers returns a vector of matching
- workers. If a particular worker is selected by GDB to invoke a method,
- then this function can help in cloning the selected worker. */
-
- virtual std::unique_ptr<xmethod_worker> clone () = 0;
-
/* Return the arg types of the xmethod encapsulated in this worker.
An array of arg types is returned. The length of the array is returned in
NARGS. The type of the 'this' object is returned as the first element of