xxhash.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. /*
  7. xxHash - Extremely Fast Hash algorithm
  8. Header File
  9. Copyright (C) 2012-2016, Yann Collet.
  10. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
  11. Redistribution and use in source and binary forms, with or without
  12. modification, are permitted provided that the following conditions are
  13. met:
  14. * Redistributions of source code must retain the above copyright
  15. notice, this list of conditions and the following disclaimer.
  16. * Redistributions in binary form must reproduce the above
  17. copyright notice, this list of conditions and the following disclaimer
  18. in the documentation and/or other materials provided with the
  19. distribution.
  20. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. You can contact the author at :
  32. - xxHash source repository : https://github.com/Cyan4973/xxHash
  33. */
  34. /* based on revision d2df04efcbef7d7f6886d345861e5dfda4edacc1 Removed
  35. * everything but a simple interface for computing XXh64. */
  36. #ifndef LLVM_SUPPORT_XXHASH_H
  37. #define LLVM_SUPPORT_XXHASH_H
  38. #include "llvm/ADT/ArrayRef.h"
  39. #include "llvm/ADT/StringRef.h"
  40. namespace llvm {
  41. uint64_t xxHash64(llvm::StringRef Data);
  42. uint64_t xxHash64(llvm::ArrayRef<uint8_t> Data);
  43. }
  44. #endif
  45. #ifdef __GNUC__
  46. #pragma GCC diagnostic pop
  47. #endif