LLVM API Documentation

Lint.h
Go to the documentation of this file.
00001 //===-- llvm/Analysis/Lint.h - LLVM IR Lint ---------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file defines lint interfaces that can be used for some sanity checking
00011 // of input to the system, and for checking that transformations
00012 // haven't done something bad. In contrast to the Verifier, the Lint checker
00013 // checks for undefined behavior or constructions with likely unintended
00014 // behavior.
00015 //
00016 // To see what specifically is checked, look at Lint.cpp
00017 //
00018 //===----------------------------------------------------------------------===//
00019 
00020 #ifndef LLVM_ANALYSIS_LINT_H
00021 #define LLVM_ANALYSIS_LINT_H
00022 
00023 namespace llvm {
00024 
00025 class FunctionPass;
00026 class Module;
00027 class Function;
00028 
00029 /// @brief Create a lint pass.
00030 ///
00031 /// Check a module or function.
00032 FunctionPass *createLintPass();
00033 
00034 /// @brief Check a module.
00035 ///
00036 /// This should only be used for debugging, because it plays games with
00037 /// PassManagers and stuff.
00038 void lintModule(
00039   const Module &M    ///< The module to be checked
00040 );
00041 
00042 // lintFunction - Check a function.
00043 void lintFunction(
00044   const Function &F  ///< The function to be checked
00045 );
00046 
00047 } // End llvm namespace
00048 
00049 #endif