[Alignment][NFC] Migrate Instructions to Align
[llvm-core.git] / include / llvm / Analysis / Lint.h
blob0fea81e215c9107762a398d03867308083ef3fd9
1 //===-- llvm/Analysis/Lint.h - LLVM IR Lint ---------------------*- 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 defines lint interfaces that can be used for some sanity checking
10 // of input to the system, and for checking that transformations
11 // haven't done something bad. In contrast to the Verifier, the Lint checker
12 // checks for undefined behavior or constructions with likely unintended
13 // behavior.
15 // To see what specifically is checked, look at Lint.cpp
17 //===----------------------------------------------------------------------===//
19 #ifndef LLVM_ANALYSIS_LINT_H
20 #define LLVM_ANALYSIS_LINT_H
22 namespace llvm {
24 class FunctionPass;
25 class Module;
26 class Function;
28 /// Create a lint pass.
29 ///
30 /// Check a module or function.
31 FunctionPass *createLintPass();
33 /// Check a module.
34 ///
35 /// This should only be used for debugging, because it plays games with
36 /// PassManagers and stuff.
37 void lintModule(
38 const Module &M ///< The module to be checked
41 // lintFunction - Check a function.
42 void lintFunction(
43 const Function &F ///< The function to be checked
46 } // End llvm namespace
48 #endif