2
0

Hashing.cpp 1.1 KB

1234567891011121314151617181920212223242526272829
  1. //===-------------- lib/Support/Hashing.cpp -------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file provides implementation bits for the LLVM common hashing
  11. // infrastructure. Documentation and most of the other information is in the
  12. // header file.
  13. //
  14. //===----------------------------------------------------------------------===//
  15. #include "llvm/ADT/Hashing.h"
  16. using namespace llvm;
  17. // Provide a definition and static initializer for the fixed seed. This
  18. // initializer should always be zero to ensure its value can never appear to be
  19. // non-zero, even during dynamic initialization.
  20. size_t llvm::hashing::detail::fixed_seed_override = 0;
  21. // Implement the function for forced setting of the fixed seed.
  22. // FIXME: Use atomic operations here so that there is no data race.
  23. void llvm::set_fixed_execution_hash_seed(size_t fixed_value) {
  24. hashing::detail::fixed_seed_override = fixed_value;
  25. }