1207618Srdivacky//===-- llvm/Analysis/Lint.h - LLVM IR Lint ---------------------*- C++ -*-===//
2207618Srdivacky//
3207618Srdivacky//                     The LLVM Compiler Infrastructure
4207618Srdivacky//
5207618Srdivacky// This file is distributed under the University of Illinois Open Source
6207618Srdivacky// License. See LICENSE.TXT for details.
7207618Srdivacky//
8207618Srdivacky//===----------------------------------------------------------------------===//
9207618Srdivacky//
10207618Srdivacky// This file defines lint interfaces that can be used for some sanity checking
11207618Srdivacky// of input to the system, and for checking that transformations
12207618Srdivacky// haven't done something bad. In contrast to the Verifier, the Lint checker
13207618Srdivacky// checks for undefined behavior or constructions with likely unintended
14207618Srdivacky// behavior.
15207618Srdivacky//
16207618Srdivacky// To see what specifically is checked, look at Lint.cpp
17207618Srdivacky//
18207618Srdivacky//===----------------------------------------------------------------------===//
19207618Srdivacky
20207618Srdivacky#ifndef LLVM_ANALYSIS_LINT_H
21207618Srdivacky#define LLVM_ANALYSIS_LINT_H
22207618Srdivacky
23207618Srdivackynamespace llvm {
24207618Srdivacky
25207618Srdivackyclass FunctionPass;
26207618Srdivackyclass Module;
27207618Srdivackyclass Function;
28207618Srdivacky
29207618Srdivacky/// @brief Create a lint pass.
30207618Srdivacky///
31207618Srdivacky/// Check a module or function.
32207618SrdivackyFunctionPass *createLintPass();
33207618Srdivacky
34207618Srdivacky/// @brief Check a module.
35207618Srdivacky///
36207618Srdivacky/// This should only be used for debugging, because it plays games with
37207618Srdivacky/// PassManagers and stuff.
38207618Srdivackyvoid lintModule(
39208599Srdivacky  const Module &M    ///< The module to be checked
40207618Srdivacky);
41207618Srdivacky
42207618Srdivacky// lintFunction - Check a function.
43207618Srdivackyvoid lintFunction(
44207618Srdivacky  const Function &F  ///< The function to be checked
45207618Srdivacky);
46207618Srdivacky
47207618Srdivacky} // End llvm namespace
48207618Srdivacky
49207618Srdivacky#endif
50