aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorArlo Siemsen <arsiem@microsoft.com>2020-03-12 16:25:01 -0700
committerReid Kleckner <rnk@google.com>2020-03-12 16:32:05 -0700
commit1478ed69d3dfc177a77e799af13075dd4474bcd0 (patch)
tree8b94fc4e13985a8259f6e853fddb50941ddd83b8 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent03f5f6bebd48ee2131fb15d10eb1cea9fe38724f (diff)
downloadllvm-1478ed69d3dfc177a77e799af13075dd4474bcd0.zip
llvm-1478ed69d3dfc177a77e799af13075dd4474bcd0.tar.gz
llvm-1478ed69d3dfc177a77e799af13075dd4474bcd0.tar.bz2
Add support for SHA256 source file checksums in debug info
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. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D75785
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 6dc6fde..814273c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -250,8 +250,15 @@ unsigned CodeViewDebug::maybeRecordFile(const DIFile *F) {
ChecksumAsBytes = ArrayRef<uint8_t>(
reinterpret_cast<const uint8_t *>(CKMem), Checksum.size());
switch (F->getChecksum()->Kind) {
- case DIFile::CSK_MD5: CSKind = FileChecksumKind::MD5; break;
- case DIFile::CSK_SHA1: CSKind = FileChecksumKind::SHA1; break;
+ case DIFile::CSK_MD5:
+ CSKind = FileChecksumKind::MD5;
+ break;
+ case DIFile::CSK_SHA1:
+ CSKind = FileChecksumKind::SHA1;
+ break;
+ case DIFile::CSK_SHA256:
+ CSKind = FileChecksumKind::SHA256;
+ break;
}
}
bool Success = OS.EmitCVFileDirective(NextId, FullPath, ChecksumAsBytes,