diff options
| author | Arlo Siemsen <arsiem@microsoft.com> | 2020-10-13 08:41:06 -0700 |
|---|---|---|
| committer | Arlo Siemsen <arsiem@microsoft.com> | 2020-10-14 15:09:51 -0700 |
| commit | 3296d5ca7b41154359eaec76d9f77310816c9913 (patch) | |
| tree | 705c0b0854d1a9526e74b5c6c3bf566be3719677 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 5565241f65cf402c3dbcb55dd492f172c473d4ce (diff) | |
| download | rust-3296d5ca7b41154359eaec76d9f77310816c9913.tar.gz rust-3296d5ca7b41154359eaec76d9f77310816c9913.zip | |
Add support for SHA256 source file hashing for LLVM 11+.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 9f8ea7f43d8..267ff5fa4cc 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -648,6 +648,7 @@ enum class LLVMRustChecksumKind { None, MD5, SHA1, + SHA256, }; static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) { @@ -658,6 +659,10 @@ static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) { return DIFile::ChecksumKind::CSK_MD5; case LLVMRustChecksumKind::SHA1: return DIFile::ChecksumKind::CSK_SHA1; +#if (LLVM_VERSION_MAJOR >= 11) + case LLVMRustChecksumKind::SHA256: + return DIFile::ChecksumKind::CSK_SHA256; +#endif default: report_fatal_error("bad ChecksumKind."); } |
