diff --git a/llvm/include/llvm/ADT/Hashing.h b/llvm/include/llvm/ADT/Hashing.h index 177fb0318bf80d..109966257b51c0 100644 --- a/llvm/include/llvm/ADT/Hashing.h +++ b/llvm/include/llvm/ADT/Hashing.h @@ -307,16 +307,16 @@ struct hash_state { }; /// In LLVM_ENABLE_ABI_BREAKING_CHECKS builds, the seed is non-deterministic -/// (address of a variable) to prevent having users depend on the particular -/// hash values. On platforms without ASLR, this is still likely -/// non-deterministic per build. +/// per process (address of a function in LLVMSupport) to prevent having users +/// depend on the particular hash values. On platforms without ASLR, this is +/// still likely non-deterministic per build. inline uint64_t get_execution_seed() { // Work around x86-64 negative offset folding for old Clang -fno-pic // https://reviews.llvm.org/D93931 #if LLVM_ENABLE_ABI_BREAKING_CHECKS && \ (!defined(__clang__) || __clang_major__ > 11) - static const char seed = 0; - return static_cast(reinterpret_cast(&seed)); + return static_cast( + reinterpret_cast(&install_fatal_error_handler)); #else return 0xff51afd7ed558ccdULL; #endif