LLVM API Documentation

Hashing.cpp
Go to the documentation of this file.
00001 //===-------------- lib/Support/Hashing.cpp -------------------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file provides implementation bits for the LLVM common hashing
00011 // infrastructure. Documentation and most of the other information is in the
00012 // header file.
00013 //
00014 //===----------------------------------------------------------------------===//
00015 
00016 #include "llvm/ADT/Hashing.h"
00017 
00018 using namespace llvm;
00019 
00020 // Provide a definition and static initializer for the fixed seed. This
00021 // initializer should always be zero to ensure its value can never appear to be
00022 // non-zero, even during dynamic initialization.
00023 size_t llvm::hashing::detail::fixed_seed_override = 0;
00024 
00025 // Implement the function for forced setting of the fixed seed.
00026 // FIXME: Use atomic operations here so that there is no data race.
00027 void llvm::set_fixed_execution_hash_seed(size_t fixed_value) {
00028   hashing::detail::fixed_seed_override = fixed_value;
00029 }