This is an archive of the discontinued LLVM Phabricator instance.

Add support for SHA256 source file checksums in debug info
ClosedPublic

Authored by arlosi on Mar 6 2020, 4:22 PM.

Details

Summary

LLVM currently supports CSK_MD5 and CSK_SHA1 source file checksums in debug info. This change adds support for CSK_SHA256 checksums.

The SHA256 checksums are supported by the CodeView debug format.

Diff Detail

Event Timeline

arlosi created this revision.Mar 6 2020, 4:22 PM

Sounds reasonable. One inline question about the test.

llvm/test/Bitcode/upgrade-dbg-checksum.ll
13 ↗(On Diff #248857)

I would expect a round-trip (as | dis | as |dis) test rather than an upgrade test when adding an extra enumerator. What am I missing?

arlosi updated this revision to Diff 248871.Mar 6 2020, 5:53 PM

Change the test from editing an upgrade test to a new round trip test.

aprantl added inline comments.Mar 9 2020, 8:40 AM
llvm/test/Assembler/dbg-checksum.ll
1

Please move this to the /Assembler directory, rename it to dbg-checksum.ll, and make the RUN line:
RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis FileCheck %s

arlosi updated this revision to Diff 249183.Mar 9 2020, 12:04 PM
arlosi marked an inline comment as done.

Renamed test to appropriate location; modified test to test to disassemble and reassemble again.

arlosi marked an inline comment as done.Mar 9 2020, 12:05 PM
aprantl accepted this revision.Mar 9 2020, 12:43 PM
This revision is now accepted and ready to land.Mar 9 2020, 12:43 PM
arlosi added a comment.Mar 9 2020, 4:36 PM

I do not have commit access. Could someone land this for me?

arlosi updated this revision to Diff 250015.Mar 12 2020, 12:05 PM

The previous update contained only the requested changes commit, losing the rest of the change.
Hopefully I've correctly used arc to create the diff this time.

arlosi updated this revision to Diff 250085.Mar 12 2020, 4:13 PM

Fix clang-tidy errors.

rnk added a comment.Mar 12 2020, 4:32 PM

I do not have commit access. Could someone land this for me?

Sure, thanks for the patch!

This revision was automatically updated to reflect the committed changes.