summaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-20 23:28:39 -0600
committerTom Tromey <tom@tromey.com>2018-07-16 08:55:22 -0600
commit6cccc9a89160455aab634784c231af4590d943f3 (patch)
treef9df8eaf98263018587b093ea8287b6c13a0c750 /gdb/cp-namespace.c
parent652788a73137d8c16ac67a0cf9a8e51dd336d09e (diff)
downloadbinutils-gdb-6cccc9a89160455aab634784c231af4590d943f3.tar.gz
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 <tom@tromey.com> * 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) <m_local_using_directives, m_global_using_directives>: 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.
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index c1d7a8db7d1..0e70adf6e40 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<const char *> excludes;
- add_using_directive (&local_using_directives,
+ add_using_directive (get_local_using_directives (),
dest, src, NULL, NULL, excludes, 1,
&objfile->objfile_obstack);
}