summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2018-08-30 20:28:32 +0000
committerTim Northover <tnorthover@apple.com>2018-08-30 20:28:32 +0000
commitc0445098519defc4bd13624095fac92977c9cfe4 (patch)
tree543f7a6a9dc599ee9ecf414a4e1535eab1d47f78 /llvm/lib
parent20892fb4b04d1c066e41e5adac825a942244a5ec (diff)
downloadbcm5719-llvm-c0445098519defc4bd13624095fac92977c9cfe4.tar.gz
bcm5719-llvm-c0445098519defc4bd13624095fac92977c9cfe4.zip
Hashing: use 64-bit seed for hashing on all platforms.
get_execution_seed returns a size_t which varies across platforms, but its users actually always feed it into a uint64_t role so it makes sense to be consistent. Mostly this is just a tidy-up, but it also apparently allows PCH files to be shared between Clang compilers built for 32-bit and 64-bit hosts. llvm-svn: 341113
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Hashing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Hashing.cpp b/llvm/lib/Support/Hashing.cpp
index c69efb7c3cc..7de25cec737 100644
--- a/llvm/lib/Support/Hashing.cpp
+++ b/llvm/lib/Support/Hashing.cpp
@@ -20,10 +20,10 @@ using namespace llvm;
// Provide a definition and static initializer for the fixed seed. This
// initializer should always be zero to ensure its value can never appear to be
// non-zero, even during dynamic initialization.
-size_t llvm::hashing::detail::fixed_seed_override = 0;
+uint64_t llvm::hashing::detail::fixed_seed_override = 0;
// Implement the function for forced setting of the fixed seed.
// FIXME: Use atomic operations here so that there is no data race.
-void llvm::set_fixed_execution_hash_seed(size_t fixed_value) {
+void llvm::set_fixed_execution_hash_seed(uint64_t fixed_value) {
hashing::detail::fixed_seed_override = fixed_value;
}
OpenPOWER on IntegriCloud