Parameterize cp_scan_for_anonymous_namespaces

This changes cp_scan_for_anonymous_namespaces to use the
buildsym_compunit API, rather than the function-based API.

gdb/ChangeLog
2018-07-20  Tom Tromey  <tom@tromey.com>

	* stabsread.c (define_symbol): Update.
	* buildsym-legacy.h (get_buildsym_compunit): Declare.
	* dwarf2read.c (new_symbol): Update.
	* cp-support.h (cp_scan_for_anonymous_namespaces): Update.
	* cp-namespace.c: Include buildsym.h.
	(cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
	* buildsym-legacy.c (get_buildsym_compunit): New function.
This commit is contained in:
Tom Tromey
2018-05-22 14:44:09 -06:00
parent 0baae8dbd3
commit 80e649fcac
7 changed files with 36 additions and 8 deletions

View File

@@ -33,6 +33,7 @@
struct symbol;
struct block;
struct buildsym_compunit;
struct objfile;
struct type;
struct demangle_component;
@@ -132,7 +133,8 @@ extern symbol_name_matcher_ftype *cp_get_symbol_name_matcher
extern int cp_is_in_anonymous (const char *symbol_name);
extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol,
extern void cp_scan_for_anonymous_namespaces (struct buildsym_compunit *,
const struct symbol *symbol,
struct objfile *objfile);
extern struct block_symbol cp_lookup_symbol_nonlocal