summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SHA1.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-04-05 20:19:49 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-04-05 20:19:49 +0000
commit1760dc2a232bde2175606ba737938d3032f1e49d (patch)
tree3859bc6b8b21c8d5073ded16260d7a5b3ff99b8f /llvm/lib/Support/SHA1.cpp
parentf2fdd013a29b26791490e3a33beda1bacfeec182 (diff)
downloadbcm5719-llvm-1760dc2a232bde2175606ba737938d3032f1e49d.tar.gz
bcm5719-llvm-1760dc2a232bde2175606ba737938d3032f1e49d.zip
Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.
Some Include What You Use suggestions were used too. Use anonymous namespaces in source files. Differential revision: http://reviews.llvm.org/D18778 llvm-svn: 265454
Diffstat (limited to 'llvm/lib/Support/SHA1.cpp')
-rw-r--r--llvm/lib/Support/SHA1.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/Support/SHA1.cpp b/llvm/lib/Support/SHA1.cpp
index 980c3bbffac..5ff2eed34c4 100644
--- a/llvm/lib/Support/SHA1.cpp
+++ b/llvm/lib/Support/SHA1.cpp
@@ -1,4 +1,4 @@
-//======- SHA1.h - Private copy of the SHA1 implementation ---*- C++ -* ======//
+//===--- SHA1.h - Private copy of the SHA1 implementation -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -13,12 +13,13 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/SHA1.h"
-using namespace llvm;
-#include <stdint.h>
-#include <string.h>
+#include <cstring>
+
+using namespace llvm;
#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#define SHA_BIG_ENDIAN
@@ -46,10 +47,14 @@ void SHA1::init() {
InternalState.BufferOffset = 0;
}
-static uint32_t rol32(uint32_t number, uint8_t bits) {
+namespace {
+
+uint32_t rol32(uint32_t number, uint8_t bits) {
return ((number << bits) | (number >> (32 - bits)));
}
+} // end anonymous namespace
+
void SHA1::hashBlock() {
uint8_t i;
uint32_t a, b, c, d, e, t;
OpenPOWER on IntegriCloud