diff options
author | Richard Guenther <rguenther@suse.de> | 2006-12-01 16:37:38 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-12-01 16:37:38 +0000 |
commit | e01e02016bab81d0c6af9c56458a05e7a40bee8b (patch) | |
tree | abba9cc4904933241f235236c24ca35ceb9c226f /gcc | |
parent | c3a88be88a471325a3684af578c348bca2034fd3 (diff) | |
download | gcc-e01e02016bab81d0c6af9c56458a05e7a40bee8b.zip gcc-e01e02016bab81d0c6af9c56458a05e7a40bee8b.tar.gz gcc-e01e02016bab81d0c6af9c56458a05e7a40bee8b.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b338a90..6dfb0c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> * config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c61f3d8..e853b2f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3756,7 +3756,7 @@ die_node; typedef struct pubname_struct GTY(()) { dw_die_ref die; - char *name; + const char *name; } pubname_entry; @@ -7358,12 +7358,10 @@ add_pubtype (tree decl, dw_die_ref die) if (TYPE_NAME (decl)) { if (TREE_CODE (TYPE_NAME (decl)) == IDENTIFIER_NODE) - e.name = xstrdup ((const char *) IDENTIFIER_POINTER - (TYPE_NAME (decl))); + e.name = IDENTIFIER_POINTER (TYPE_NAME (decl)); else if (TREE_CODE (TYPE_NAME (decl)) == TYPE_DECL && DECL_NAME (TYPE_NAME (decl))) - e.name = xstrdup ((const char *) IDENTIFIER_POINTER - (DECL_NAME (TYPE_NAME (decl)))); + e.name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (decl))); else e.name = xstrdup ((const char *) get_AT_string (die, DW_AT_name)); } |