aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-04-30 12:50:24 -0400
committerJason Merrill <jason@gcc.gnu.org>2012-04-30 12:50:24 -0400
commit85dd5559489b154582d81f668fc1a3af63ab4764 (patch)
tree73a65e2744e50b3abc0b9904fa66179284895ff0
parent1941b0ca5b772c73ff39bece36111e25ee83df7a (diff)
downloadgcc-85dd5559489b154582d81f668fc1a3af63ab4764.zip
gcc-85dd5559489b154582d81f668fc1a3af63ab4764.tar.gz
gcc-85dd5559489b154582d81f668fc1a3af63ab4764.tar.bz2
dwarf2out.c (comdat_symbol_id): Add const.
* dwarf2out.c (comdat_symbol_id): Add const. (union die_symbol_or_type_node): Add const to die_symbol. (output_die_symbol, output_die, output_comp_unit): Adjust. From-SVN: r186989
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index df2de77..5a39f21 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-30 Jason Merrill <jason@redhat.com>
+
+ * dwarf2out.c (comdat_symbol_id): Add const.
+ (union die_symbol_or_type_node): Add const to die_symbol.
+ (output_die_symbol, output_die, output_comp_unit): Adjust.
+
2012-04-30 Andrew Stubbs <ams@codesourcery.com>
* config/arm/arm.md (negdi2): Use gen_negdi2_neon.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 98b53f0..fd485fb 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2470,7 +2470,7 @@ DEF_VEC_ALLOC_O(dw_attr_node,gc);
typedef struct GTY((chain_circular ("%h.die_sib"))) die_struct {
union die_symbol_or_type_node
{
- char * GTY ((tag ("0"))) die_symbol;
+ const char * GTY ((tag ("0"))) die_symbol;
comdat_type_node_ref GTY ((tag ("1"))) die_type_node;
}
GTY ((desc ("use_debug_types"))) die_id;
@@ -5825,7 +5825,7 @@ same_die_p_wrap (dw_die_ref die1, dw_die_ref die2)
/* The prefix to attach to symbols on DIEs in the current comdat debug
info section. */
-static char *comdat_symbol_id;
+static const char *comdat_symbol_id;
/* The index of the current symbol within the current comdat CU. */
static unsigned int comdat_symbol_number;
@@ -7396,7 +7396,7 @@ output_abbrev_section (void)
static inline void
output_die_symbol (dw_die_ref die)
{
- char *sym = die->die_id.die_symbol;
+ const char *sym = die->die_id.die_symbol;
if (sym == 0)
return;
@@ -7678,7 +7678,7 @@ output_die (dw_die_ref die)
}
else
{
- char *sym = AT_ref (a)->die_id.die_symbol;
+ const char *sym = AT_ref (a)->die_id.die_symbol;
int size;
gcc_assert (sym);
@@ -7800,8 +7800,8 @@ output_compilation_unit_header (void)
static void
output_comp_unit (dw_die_ref die, int output_if_empty)
{
- const char *secname;
- char *oldsym, *tmp;
+ const char *secname, *oldsym;
+ char *tmp;
/* Unless we are outputting main CU, we may throw away empty ones. */
if (!output_if_empty && die->die_child == NULL)