LLVM  6.0.0svn
Lint.h
Go to the documentation of this file.
1 //===-- llvm/Analysis/Lint.h - LLVM IR Lint ---------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines lint interfaces that can be used for some sanity checking
11 // of input to the system, and for checking that transformations
12 // haven't done something bad. In contrast to the Verifier, the Lint checker
13 // checks for undefined behavior or constructions with likely unintended
14 // behavior.
15 //
16 // To see what specifically is checked, look at Lint.cpp
17 //
18 //===----------------------------------------------------------------------===//
19 
20 #ifndef LLVM_ANALYSIS_LINT_H
21 #define LLVM_ANALYSIS_LINT_H
22 
23 namespace llvm {
24 
25 class FunctionPass;
26 class Module;
27 class Function;
28 
29 /// @brief Create a lint pass.
30 ///
31 /// Check a module or function.
32 FunctionPass *createLintPass();
33 
34 /// @brief Check a module.
35 ///
36 /// This should only be used for debugging, because it plays games with
37 /// PassManagers and stuff.
38 void lintModule(
39  const Module &M ///< The module to be checked
40 );
41 
42 // lintFunction - Check a function.
43 void lintFunction(
44  const Function &F ///< The function to be checked
45 );
46 
47 } // End llvm namespace
48 
49 #endif
void lintModule(const Module &M)
Check a module.
Definition: Lint.cpp:740
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
void lintFunction(const Function &F)
lintFunction - Check a function for errors, printing messages on stderr.
Definition: Lint.cpp:728
F(f)
FunctionPass * createLintPass()
Create a lint pass.
Definition: Lint.cpp:722