Mercurial > hg > CbC > CbC_llvm
diff llvm/lib/Support/SHA1.cpp @ 173:0572611fdcc8 llvm10 llvm12
reorgnization done
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 11:55:54 +0900 |
parents | 1d019706d866 |
children | 2e18cbf3894f |
line wrap: on
line diff
--- a/llvm/lib/Support/SHA1.cpp Mon May 25 11:50:15 2020 +0900 +++ b/llvm/lib/Support/SHA1.cpp Mon May 25 11:55:54 2020 +0900 @@ -16,12 +16,12 @@ #include "llvm/Support/SHA1.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Host.h" -using namespace llvm; +#include <string.h> -#include <stdint.h> -#include <string.h> +using namespace llvm; #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN #define SHA_BIG_ENDIAN @@ -238,6 +238,11 @@ addUncounted(C); } +void SHA1::update(StringRef Str) { + update( + ArrayRef<uint8_t>((uint8_t *)const_cast<char *>(Str.data()), Str.size())); +} + void SHA1::pad() { // Implement SHA-1 padding (fips180-2 5.1.1)