1234285Sdim//===-------------- lib/Support/Hashing.cpp -------------------------------===// 2234285Sdim// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6234285Sdim// 7234285Sdim//===----------------------------------------------------------------------===// 8234285Sdim// 9234285Sdim// This file provides implementation bits for the LLVM common hashing 10234285Sdim// infrastructure. Documentation and most of the other information is in the 11234285Sdim// header file. 12234285Sdim// 13234285Sdim//===----------------------------------------------------------------------===// 14234285Sdim 15234285Sdim#include "llvm/ADT/Hashing.h" 16234285Sdim 17234285Sdimusing namespace llvm; 18234285Sdim 19234285Sdim// Provide a definition and static initializer for the fixed seed. This 20234285Sdim// initializer should always be zero to ensure its value can never appear to be 21234285Sdim// non-zero, even during dynamic initialization. 22344779Sdimuint64_t llvm::hashing::detail::fixed_seed_override = 0; 23234285Sdim 24234285Sdim// Implement the function for forced setting of the fixed seed. 25234285Sdim// FIXME: Use atomic operations here so that there is no data race. 26344779Sdimvoid llvm::set_fixed_execution_hash_seed(uint64_t fixed_value) { 27234285Sdim hashing::detail::fixed_seed_override = fixed_value; 28234285Sdim} 29