From: Eric Christopher Date: Fri, 31 May 2013 22:34:52 +0000 (+0000) Subject: Convert more unsigned char -> uint8_t. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cbb45aa123c42dabb38f14bc1879848d77896998;p=oota-llvm.git Convert more unsigned char -> uint8_t. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183053 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/MD5.cpp b/lib/Support/MD5.cpp index 4c72cef60b0..8f180684ff6 100644 --- a/lib/Support/MD5.cpp +++ b/lib/Support/MD5.cpp @@ -183,7 +183,7 @@ MD5::MD5() : a(0x67452301), b(0xefcdab89), c(0x98badcfe), d(0x10325476), hi(0), lo(0) { } -/// Incrementally add the bytes in Data to the hash. +/// Incrementally add the bytes in \p Data to the hash. void MD5::update(ArrayRef Data) { MD5_u32plus saved_lo; unsigned long used, free; diff --git a/unittests/Support/MD5Test.cpp b/unittests/Support/MD5Test.cpp index 6afaa15c27b..c5658ec4976 100644 --- a/unittests/Support/MD5Test.cpp +++ b/unittests/Support/MD5Test.cpp @@ -20,7 +20,7 @@ using namespace llvm; namespace { /// \brief Tests an arbitrary set of bytes passed as \p Input. -void TestMD5Sum(ArrayRef Input, StringRef Final) { +void TestMD5Sum(ArrayRef Input, StringRef Final) { MD5 Hash; Hash.update(Input); MD5::MD5Result MD5Res; @@ -31,20 +31,20 @@ void TestMD5Sum(ArrayRef Input, StringRef Final) { } TEST(MD5Test, MD5) { - TestMD5Sum(ArrayRef((const unsigned char *)"", (size_t) 0), + TestMD5Sum(ArrayRef((const uint8_t *)"", (size_t) 0), "d41d8cd98f00b204e9800998ecf8427e"); - TestMD5Sum(ArrayRef((const unsigned char *)"a", (size_t) 1), + TestMD5Sum(ArrayRef((const uint8_t *)"a", (size_t) 1), "0cc175b9c0f1b6a831c399e269772661"); - TestMD5Sum(ArrayRef( - (const unsigned char *)"abcdefghijklmnopqrstuvwxyz", + TestMD5Sum(ArrayRef( + (const uint8_t *)"abcdefghijklmnopqrstuvwxyz", (size_t) 26), "c3fcd3d76192e4007dfb496cca67e13b"); - TestMD5Sum(ArrayRef((const unsigned char *)"\0", (size_t) 1), + TestMD5Sum(ArrayRef((const uint8_t *)"\0", (size_t) 1), "93b885adfe0da089cdf634904fd59f71"); - TestMD5Sum(ArrayRef((const unsigned char *)"a\0", (size_t) 2), + TestMD5Sum(ArrayRef((const uint8_t *)"a\0", (size_t) 2), "4144e195f46de78a3623da7364d04f11"); - TestMD5Sum(ArrayRef( - (const unsigned char *)"abcdefghijklmnopqrstuvwxyz\0", + TestMD5Sum(ArrayRef( + (const uint8_t *)"abcdefghijklmnopqrstuvwxyz\0", (size_t) 27), "81948d1f1554f58cd1a56ebb01f808cb"); }