mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
gdb: Remove a cleanup from find_overload_match
This patch changes cp-support.c:cp_func_name to return a 'gdb::unique_xmalloc_ptr<char>' instead of a 'char *'. This allows a cleanup to be removed from valops.c:find_overload_match. gdb/ChangeLog: * compile/compile-cplus-types.c (compile_cplus_instance::decl_name): Handle changes to cp_func_name. * cp-support.c (cp_func_name): Update header comment, update return type. * cp-support.h (cp_func_name): Update return type in declaration. * valops.c (find_overload_match): Move temp_func local to top level of function and change its type. Use temp_func to hold and delete temporary string obtained from cp_func_name.
This commit is contained in:
@@ -96,7 +96,7 @@ extern unsigned int cp_find_first_component (const char *name);
|
||||
|
||||
extern unsigned int cp_entire_prefix_len (const char *name);
|
||||
|
||||
extern char *cp_func_name (const char *full_name);
|
||||
extern gdb::unique_xmalloc_ptr<char> cp_func_name (const char *full_name);
|
||||
|
||||
extern gdb::unique_xmalloc_ptr<char> cp_remove_params
|
||||
(const char *demanged_name);
|
||||
|
||||
Reference in New Issue
Block a user