diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-03-10 16:22:29 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-03-10 16:22:29 +0000 |
commit | c0cc3a767075f2411cf855ec10d038e591ae5368 (patch) | |
tree | 7ba3a4e5468116fe17355bd326f99eeb3903316c /gdb/dwarf2read.c | |
parent | 452fa0647cbaf4fbf4eb5eeb16ef4ac01c88e76f (diff) | |
download | gdb-c0cc3a767075f2411cf855ec10d038e591ae5368.zip gdb-c0cc3a767075f2411cf855ec10d038e591ae5368.tar.gz gdb-c0cc3a767075f2411cf855ec10d038e591ae5368.tar.bz2 |
2010-03-09 Sami Wagiaalla <swagiaal@redhat.com>
PR C++/11236:
* cp-namespace.c (cp_add_using): Deleted.
(cp_add_using_directive): Use obstack allocations.
Merged the function cp_add_using into this one.
Added 'struct obstack *' argument.
(cp_scan_for_anonymous_namespaces): Updated.
* cp-support.h: Updated.
* dwarf2read.c (read_import_statement): Updated.
(read_namespace): Updated.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index fd75c74..378d192 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3530,10 +3530,10 @@ read_import_statement (struct die_info *die, struct dwarf2_cu *cu) strcpy (canonical_name, imported_name); } - using_directives = cp_add_using (import_prefix, - canonical_name, - import_alias, - using_directives); + cp_add_using_directive (import_prefix, + canonical_name, + import_alias, + &cu->objfile->objfile_obstack); } static void @@ -5651,7 +5651,8 @@ read_namespace (struct die_info *die, struct dwarf2_cu *cu) if (is_anonymous) { const char *previous_prefix = determine_prefix (die, cu); - cp_add_using_directive (previous_prefix, TYPE_NAME (type), NULL); + cp_add_using_directive (previous_prefix, TYPE_NAME (type), NULL, + &objfile->objfile_obstack); } } |