diff options
author | Tom Tromey <tom@tromey.com> | 2021-01-23 17:48:32 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-01-23 17:48:48 -0700 |
commit | 9f7f6cb8d2cf1f356aab2a260baaa537de24d00b (patch) | |
tree | 816b55aeabd58ee8cb04a6a9feca901abfe49a7b /gdb/compile/compile-internal.h | |
parent | c99d72de189600f1a8307416f8a8979924ba931b (diff) | |
download | binutils-9f7f6cb8d2cf1f356aab2a260baaa537de24d00b.zip binutils-9f7f6cb8d2cf1f356aab2a260baaa537de24d00b.tar.gz binutils-9f7f6cb8d2cf1f356aab2a260baaa537de24d00b.tar.bz2 |
Remove call to reset from compile_to_object
compile_to_object declares 'error_message' and then immediately calls
reset on it. It seemed better to change it to use initialization
instead; and then I noticed that set_arguments could return a
unique_xmalloc_ptr<char> itself.
2021-01-23 Tom Tromey <tom@tromey.com>
* compile/compile-internal.h (class compile_instance)
<set_arguments>: Change return type.
* compile/compile.c (compile_to_object): Remove call to reset.
(compile_instance::set_arguments): Change return type.
Diffstat (limited to 'gdb/compile/compile-internal.h')
-rw-r--r-- | gdb/compile/compile-internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/compile/compile-internal.h b/gdb/compile/compile-internal.h index dbded02..49ddbd4 100644 --- a/gdb/compile/compile-internal.h +++ b/gdb/compile/compile-internal.h @@ -96,7 +96,8 @@ public: /* Set compilation arguments. REGEXP is only used for protocol version GCC_FE_VERSION_0. */ - char *set_arguments (int argc, char **argv, const char *regexp = NULL); + gdb::unique_xmalloc_ptr<char> set_arguments (int argc, char **argv, + const char *regexp = NULL); /* Set the filename of the program to compile. Nop for GCC_FE_VERSION_0. */ void set_source_file (const char *filename); |