1234285Sdim//===-------------- lib/Support/Hashing.cpp -------------------------------===// 2234285Sdim// 3234285Sdim// The LLVM Compiler Infrastructure 4234285Sdim// 5234285Sdim// This file is distributed under the University of Illinois Open Source 6234285Sdim// License. See LICENSE.TXT for details. 7234285Sdim// 8234285Sdim//===----------------------------------------------------------------------===// 9234285Sdim// 10234285Sdim// This file provides implementation bits for the LLVM common hashing 11234285Sdim// infrastructure. Documentation and most of the other information is in the 12234285Sdim// header file. 13234285Sdim// 14234285Sdim//===----------------------------------------------------------------------===// 15234285Sdim 16234285Sdim#include "llvm/ADT/Hashing.h" 17234285Sdim 18234285Sdimusing namespace llvm; 19234285Sdim 20234285Sdim// Provide a definition and static initializer for the fixed seed. This 21234285Sdim// initializer should always be zero to ensure its value can never appear to be 22234285Sdim// non-zero, even during dynamic initialization. 23234285Sdimsize_t llvm::hashing::detail::fixed_seed_override = 0; 24234285Sdim 25234285Sdim// Implement the function for forced setting of the fixed seed. 26234285Sdim// FIXME: Use atomic operations here so that there is no data race. 27234285Sdimvoid llvm::set_fixed_execution_hash_seed(size_t fixed_value) { 28234285Sdim hashing::detail::fixed_seed_override = fixed_value; 29234285Sdim} 30