Commit 75a41878 by Eric Christopher Committed by Eric Christopher

dwarf2out.c (die_odr_checksum): New function to use CHECKSUM_ macros and ULEB128 for DIE tag.

2013-07-22  Eric Christopher  <echristo@gmail.com>

	    * dwarf2out.c (die_odr_checksum): New function to use
	    CHECKSUM_ macros and ULEB128 for DIE tag.
	    (generate_type_signature): Use.

From-SVN: r201148
parent 38ae58ca
2013-07-22 Eric Christopher <echristo@gmail.com>
* dwarf2out.c (die_odr_checksum): New function to use
CHECKSUM_ macros and ULEB128 for DIE tag.
(generate_type_signature): Use.
2013-07-22 Eric Botcazou <ebotcazou@adacore.com> 2013-07-22 Eric Botcazou <ebotcazou@adacore.com>
* config.gcc (sparc*-*-*): Accept leon3 processor. * config.gcc (sparc*-*-*): Accept leon3 processor.
......
...@@ -6103,6 +6103,14 @@ die_checksum_ordered (dw_die_ref die, struct md5_ctx *ctx, int *mark) ...@@ -6103,6 +6103,14 @@ die_checksum_ordered (dw_die_ref die, struct md5_ctx *ctx, int *mark)
CHECKSUM_ULEB128 (0); CHECKSUM_ULEB128 (0);
} }
/* Add a type name and tag to a hash. */
static void
die_odr_checksum (int tag, const char *name, md5_ctx *ctx)
{
CHECKSUM_ULEB128 (tag);
CHECKSUM_STRING (name);
}
#undef CHECKSUM #undef CHECKSUM
#undef CHECKSUM_STRING #undef CHECKSUM_STRING
#undef CHECKSUM_ATTR #undef CHECKSUM_ATTR
...@@ -6143,8 +6151,8 @@ generate_type_signature (dw_die_ref die, comdat_type_node *type_node) ...@@ -6143,8 +6151,8 @@ generate_type_signature (dw_die_ref die, comdat_type_node *type_node)
if (parent != NULL) if (parent != NULL)
checksum_die_context (parent, &ctx); checksum_die_context (parent, &ctx);
md5_process_bytes (&die->die_tag, sizeof (die->die_tag), &ctx); /* Checksum the current DIE. */
md5_process_bytes (name, strlen (name) + 1, &ctx); die_odr_checksum (die->die_tag, name, &ctx);
md5_finish_ctx (&ctx, checksum); md5_finish_ctx (&ctx, checksum);
add_AT_data8 (type_node->root_die, DW_AT_GNU_odr_signature, &checksum[8]); add_AT_data8 (type_node->root_die, DW_AT_GNU_odr_signature, &checksum[8]);
......
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