Put all LLVM code into the llvm namespace, as per bug 109.
[oota-llvm.git] / include / llvm / Analysis / Verifier.h
1 //===-- llvm/Analysis/Verifier.h - Module Verifier --------------*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the function verifier interface, that can be used for some
11 // sanity checking of input to the system, and for checking that transformations
12 // haven't done something bad.
13 //
14 // Note that this does not provide full 'java style' security and verifications,
15 // instead it just tries to ensure that code is well formed.
16 //
17 // To see what specifically is checked, look at the top of Verifier.cpp
18 //
19 //===----------------------------------------------------------------------===//
20
21 #ifndef LLVM_ANALYSIS_VERIFIER_H
22 #define LLVM_ANALYSIS_VERIFIER_H
23
24 namespace llvm {
25
26 class FunctionPass;
27 class Module;
28 class Function;
29
30 // createVerifierPass - Check a module or function for validity.  If errors are
31 // detected, error messages corresponding to the problem are printed to stderr.
32 //
33 FunctionPass *createVerifierPass();
34
35 // verifyModule - Check a module for errors, printing messages on stderr.
36 // Return true if the module is corrupt.  This should only be used for
37 // debugging, because it plays games with PassManagers and stuff.
38 //
39 bool verifyModule(const Module &M);
40
41 // verifyFunction - Check a function for errors, useful for use when debugging a
42 // pass.
43 bool verifyFunction(const Function &F);
44
45 } // End llvm namespace
46
47 #endif