summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SHA1.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-01 05:12:24 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-01 05:12:24 +0000
commit180441f09a75db6748db9c7de8da35437f39e402 (patch)
tree40a4bbe8980a78523d3ab44f10b01f8d8231d61a /llvm/lib/Support/SHA1.cpp
parent7ef783d1faef2afd3ecace297bdea3dc6388e8ba (diff)
downloadbcm5719-llvm-180441f09a75db6748db9c7de8da35437f39e402.tar.gz
bcm5719-llvm-180441f09a75db6748db9c7de8da35437f39e402.zip
Fix S390 big endian detection
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265109
Diffstat (limited to 'llvm/lib/Support/SHA1.cpp')
-rw-r--r--llvm/lib/Support/SHA1.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/SHA1.cpp b/llvm/lib/Support/SHA1.cpp
index 50fa698a4be..980c3bbffac 100644
--- a/llvm/lib/Support/SHA1.cpp
+++ b/llvm/lib/Support/SHA1.cpp
@@ -13,13 +13,14 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/Support/Host.h"
#include "llvm/Support/SHA1.h"
using namespace llvm;
#include <stdint.h>
#include <string.h>
-#ifdef __BIG_ENDIAN__
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#define SHA_BIG_ENDIAN
#endif
@@ -113,7 +114,7 @@ void SHA1::update(ArrayRef<uint8_t> Data) {
}
void SHA1::pad() {
- // Implement SHA-1 padding (fips180-2 ยง5.1.1)
+ // Implement SHA-1 padding (fips180-2 5.1.1)
// Pad with 0x80 followed by 0x00 until the end of the block
addUncounted(0x80);
OpenPOWER on IntegriCloud