On Mon, Jul 22, 2013 at 01:15:15PM -0700, Eric Christopher wrote: > --- gcc/dwarf2out.c (revision 198904) > +++ gcc/dwarf2out.c (working copy) > @@ -6097,6 +6097,13 @@ > CHECKSUM_ULEB128 (0); > } >
I guess you should add a function comment, plus spaces before ( everywhere (and while you're at it, you can change also the is_cxx() ). Will leave the rest to Cary. > +static void > +die_odr_checksum (dw_die_ref die, md5_ctx *ctx) > +{ > + CHECKSUM_ULEB128(die->die_tag); > + CHECKSUM_STRING(get_AT_string(die, DW_AT_name)); > +} > + > #undef CHECKSUM > #undef CHECKSUM_STRING > #undef CHECKSUM_ATTR > @@ -6128,7 +6135,6 @@ > /* First, compute a signature for just the type name (and its surrounding > context, if any. This is stored in the type unit DIE for link-time > ODR (one-definition rule) checking. */ > - > if (is_cxx() && name != NULL) > { > md5_init_ctx (&ctx); > @@ -6137,8 +6143,8 @@ > if (parent != NULL) > checksum_die_context (parent, &ctx); > > - md5_process_bytes (&die->die_tag, sizeof (die->die_tag), &ctx); > - md5_process_bytes (name, strlen (name) + 1, &ctx); > + /* Checksum the current DIE. */ > + die_odr_checksum(die, &ctx); > md5_finish_ctx (&ctx, checksum); > > add_AT_data8 (type_node->root_die, DW_AT_GNU_odr_signature, > &checksum[8]); Jakub