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.
This commit is contained in:
Sami Wagiaalla
2010-03-10 16:22:29 +00:00
parent 452fa0647c
commit c0cc3a7670
4 changed files with 45 additions and 47 deletions

View File

@@ -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);
}
}