This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] psymtab.c (add_psymbol_to_list): Result is now "void".
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Thu, 26 Jan 2012 14:24:05 -0800 (PST)
- Subject: [commit] psymtab.c (add_psymbol_to_list): Result is now "void".
Hi.
I noticed there are now no users of the result of add_psymbol_to_list.
Committed.
2012-01-26 Doug Evans <dje@google.com>
* psymtab.c (add_psymbol_to_list): Result is now "void".
* psympriv.h (add_psymbol_to_list): Update.
Index: psympriv.h
===================================================================
RCS file: /cvs/src/src/gdb/psympriv.h,v
retrieving revision 1.11
diff -u -p -r1.11 psympriv.h
--- psympriv.h 4 Jan 2012 08:17:09 -0000 1.11
+++ psympriv.h 26 Jan 2012 22:18:01 -0000
@@ -164,13 +164,12 @@ extern void sort_pst_symbols (struct par
/* Add any kind of symbol to a psymbol_allocation_list. */
-extern const
-struct partial_symbol *add_psymbol_to_list (const char *, int,
- int, domain_enum,
- enum address_class,
- struct psymbol_allocation_list *,
- long, CORE_ADDR,
- enum language, struct objfile *);
+extern void add_psymbol_to_list (const char *, int,
+ int, domain_enum,
+ enum address_class,
+ struct psymbol_allocation_list *,
+ long, CORE_ADDR,
+ enum language, struct objfile *);
extern void init_psymbol_list (struct objfile *, int);
Index: psymtab.c
===================================================================
RCS file: /cvs/src/src/gdb/psymtab.c,v
retrieving revision 1.40
diff -u -p -r1.40 psymtab.c
--- psymtab.c 26 Jan 2012 04:21:40 -0000 1.40
+++ psymtab.c 26 Jan 2012 22:18:01 -0000
@@ -1566,18 +1566,7 @@ append_psymbol_to_list (struct psymbol_a
Since one arg is a struct, we pass in a ptr and deref it (sigh).
Return the partial symbol that has been added. */
-/* NOTE: carlton/2003-09-11: The reason why we return the partial
- symbol is so that callers can get access to the symbol's demangled
- name, which they don't have any cheap way to determine otherwise.
- (Currenly, dwarf2read.c is the only file who uses that information,
- though it's possible that other readers might in the future.)
- Elena wasn't thrilled about that, and I don't blame her, but we
- couldn't come up with a better way to get that information. If
- it's needed in other situations, we could consider breaking up
- SYMBOL_SET_NAMES to provide access to the demangled name lookup
- cache. */
-
-const struct partial_symbol *
+void
add_psymbol_to_list (const char *name, int namelength, int copy_name,
domain_enum domain,
enum address_class class,
@@ -1597,11 +1586,10 @@ add_psymbol_to_list (const char *name, i
/* Do not duplicate global partial symbols. */
if (list == &objfile->global_psymbols
&& !added)
- return psym;
+ return;
/* Save pointer to partial symbol in psymtab, growing symtab if needed. */
append_psymbol_to_list (list, psym, objfile);
- return psym;
}
/* Initialize storage for partial symbols. */