diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-01 16:37:38 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-01 16:37:38 +0000 |
commit | 525705076d4bb3252dec1bd80ee5100d3e3f7cfa (patch) | |
tree | abba9cc4904933241f235236c24ca35ceb9c226f /gcc/dwarf2out.c | |
parent | 894342c13b2795fc72fda324c138bfd716930d80 (diff) | |
download | gcc-525705076d4bb3252dec1bd80ee5100d3e3f7cfa.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c61f3d8bd92..e853b2fde2e 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)); } |