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