StructuralHash.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- llvm/IR/StructuralHash.h - IR Hash for expensive checks --*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file provides hashing of the LLVM IR structure to be used to check
  15. // Passes modification status.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_IR_STRUCTURALHASH_H
  19. #define LLVM_IR_STRUCTURALHASH_H
  20. #ifdef EXPENSIVE_CHECKS
  21. #include <cstdint>
  22. // This header is only meant to be used when -DEXPENSIVE_CHECKS is set
  23. namespace llvm {
  24. class Function;
  25. class Module;
  26. uint64_t StructuralHash(const Function &F);
  27. uint64_t StructuralHash(const Module &M);
  28. } // end namespace llvm
  29. #endif
  30. #endif // LLVM_IR_STRUCTURALHASH_H
  31. #ifdef __GNUC__
  32. #pragma GCC diagnostic pop
  33. #endif