Add support for computing SHA1 in LLVM
authorMehdi Amini <mehdi.amini@apple.com>
Fri, 1 Apr 2016 04:30:16 +0000 (04:30 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Fri, 1 Apr 2016 04:30:16 +0000 (04:30 +0000)
commit4cd57025781a463a8c07e8fdeccc632033c4f77f
treeef5850c1189f1ce036dee46058125ab91dc19f1b
parent3de5ef96c93943af6154eeeccad2d7774343e97f
Add support for computing SHA1 in LLVM

Provide a class to generate a SHA1 from a sequence of bytes, and
a convenience raw_ostream adaptor.
This will be used to provide a "build-id" by hashing the Module
block when writing bitcode. ThinLTO will use this information for
incremental build.

Reapply r265094 which was reverted in r265102 because it broke
MSVC bots (constexpr is not supported).

http://reviews.llvm.org/D16325

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265107
llvm/include/llvm/Support/SHA1.h [new file with mode: 0644]
llvm/include/llvm/Support/raw_sha1_ostream.h [new file with mode: 0644]
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/SHA1.cpp [new file with mode: 0644]
llvm/unittests/Support/CMakeLists.txt
llvm/unittests/Support/raw_sha1_ostream_test.cpp [new file with mode: 0644]