[PATCH] Use CHECKSUM_ macros and ULEB128 checksum for DIE tag
Eric Christopher
echristo@gmail.com
Mon Jul 22 21:59:00 GMT 2013
On Mon, Jul 22, 2013 at 1:30 PM, Cary Coutant <ccoutant@google.com> wrote:
> - 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);
>
> Since we've already gone to the trouble of getting the name of this
> DIE, it seems wasteful to have die_odr_checksum call get_AT_string
> again. Why not just pass name as a parameter?
>
Was mostly being cute and assuming it'd get removed. I'll just pass
both of them down into the function for now. If we decide later that
we want to change what's hashed we can change the function.
>> 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.
>
> Agree with the function comment and the spaces.
Oh yeah, thanks. Sorry, it's been a while.
>
>> 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.
>
> This is OK with those changes. Thanks!
>
Committed thusly:
ghostwheel:~/sources/gcc> svn ci
Sending gcc/ChangeLog
Sending gcc/dwarf2out.c
Transmitting file data ..
Committed revision 201148.
Thanks!
-eric
More information about the Gcc-patches
mailing list