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.