From 6cccc9a89160455aab634784c231af4590d943f3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 20 May 2018 23:28:39 -0600 Subject: Move the using directives to buildsym_compunit This moves the globals local_using_directives and global_using_directives to be members of buildsym_compunit, and adds the necessary accessors. gdb/ChangeLog 2018-07-16 Tom Tromey * dwarf2read.c (using_directives, read_func_scope) (read_lexical_block_scope): Update. * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update. * buildsym.h (local_using_directives, global_using_directives): Don't declare. (get_local_using_directives, set_local_using_directives) (get_global_using_directives): Declare. * buildsym.c (struct buildsym_compunit) : New members. (finish_block_internal, prepare_for_building) (reset_symtab_globals, end_symtab_get_static_block) (push_context): Update. (get_local_using_directives, set_local_using_directives) (get_global_using_directives): New functions. (buildsym_init): Update. --- gdb/cp-namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/cp-namespace.c') diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index c1d7a8d..0e70adf 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -94,7 +94,7 @@ cp_scan_for_anonymous_namespaces (const struct symbol *const symbol, namespace given by the previous component if there is one, or to the global namespace if there isn't. */ std::vector excludes; - add_using_directive (&local_using_directives, + add_using_directive (get_local_using_directives (), dest, src, NULL, NULL, excludes, 1, &objfile->objfile_obstack); } -- cgit v1.1