[PATCH] D116835: Use sha256 for source file debug info checksums with MSVC compat >= 1930

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 7 12:00:58 PST 2022


hans created this revision.
hans added reviewers: thakis, rnk, arlosi.
Herald added subscribers: dexonsmith, hiraditya.
hans requested review of this revision.
Herald added projects: clang, LLVM.

>From the VS2022 release notes, it sounds like newer MSVC versions are using SHA256 for these checksums: (search for "SHA-256" in https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes#17.0.0)

Since D75785 <https://reviews.llvm.org/D75785> laid the groundwork, let's hook it up.

While here, I noticed llvm::SHA256 doesn't have a method to get the hash as a hex string, like llvm::MD5. But we can use llvm::toHex() and actually that could be made more efficient and llvm::MD5 could use that too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116835

Files:
  clang/include/clang/Basic/LangOptions.h
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/lib/CodeGen/CGDebugInfo.h
  clang/test/CodeGen/debug-info-file-checksum.c
  llvm/include/llvm/ADT/StringExtras.h
  llvm/include/llvm/Support/MD5.h
  llvm/lib/Support/MD5.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116835.398208.patch
Type: text/x-patch
Size: 6596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220107/2ceedafa/attachment.bin>


More information about the cfe-commits mailing list