Commit e01e0201 by Richard Guenther Committed by Richard Biener

re PR c++/29433 (using boost::MPL requires lots of memory)

2006-12-01  Richard Guenther  <rguenther@suse.de>

	PR c++/29433
	* dwarf2out.c (struct pubname_struct): Make name const.
	(add_pubtype): Do not xstrdup identifiers.

From-SVN: r119404
parent c3a88be8
2006-12-01 Richard Guenther <rguenther@suse.de>
PR c++/29433
* dwarf2out.c (struct pubname_struct): Make name const.
(add_pubtype): Do not xstrdup identifiers.
2006-12-01 Bernd Schmidt <bernd.schmidt@analog.com> 2006-12-01 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures * config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures
......
...@@ -3756,7 +3756,7 @@ die_node; ...@@ -3756,7 +3756,7 @@ die_node;
typedef struct pubname_struct GTY(()) typedef struct pubname_struct GTY(())
{ {
dw_die_ref die; dw_die_ref die;
char *name; const char *name;
} }
pubname_entry; pubname_entry;
...@@ -7358,12 +7358,10 @@ add_pubtype (tree decl, dw_die_ref die) ...@@ -7358,12 +7358,10 @@ add_pubtype (tree decl, dw_die_ref die)
if (TYPE_NAME (decl)) if (TYPE_NAME (decl))
{ {
if (TREE_CODE (TYPE_NAME (decl)) == IDENTIFIER_NODE) if (TREE_CODE (TYPE_NAME (decl)) == IDENTIFIER_NODE)
e.name = xstrdup ((const char *) IDENTIFIER_POINTER e.name = IDENTIFIER_POINTER (TYPE_NAME (decl));
(TYPE_NAME (decl)));
else if (TREE_CODE (TYPE_NAME (decl)) == TYPE_DECL else if (TREE_CODE (TYPE_NAME (decl)) == TYPE_DECL
&& DECL_NAME (TYPE_NAME (decl))) && DECL_NAME (TYPE_NAME (decl)))
e.name = xstrdup ((const char *) IDENTIFIER_POINTER e.name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (decl)));
(DECL_NAME (TYPE_NAME (decl))));
else else
e.name = xstrdup ((const char *) get_AT_string (die, DW_AT_name)); e.name = xstrdup ((const char *) get_AT_string (die, DW_AT_name));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment