Rename Method to Function
[oota-llvm.git] / include / llvm / Analysis / Verifier.h
1 //===-- llvm/Analysis/Verifier.h - Module Verifier ---------------*- C++ -*-==//
2 //
3 // This file defines the method verifier interface, that can be used for some
4 // sanity checking of input to the system.
5 //
6 // Note that this does not provide full 'java style' security and verifications,
7 // instead it just tries to ensure that code is well formed.
8 //
9 // To see what specifically is checked, look at the top of Verifier.cpp
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_ANALYSIS_VERIFIER_H
14 #define LLVM_ANALYSIS_VERIFIER_H
15
16 class Pass;
17 class Module;
18 class Function;
19
20 // createVerifierPass - Check a module or method for validity.  If errors are
21 // detected, error messages corresponding to the problem are printed to stderr.
22 //
23 Pass *createVerifierPass();
24
25 // verifyModule - Check a module for errors, printing messages on stderr.
26 // Return true if the module is corrupt.
27 //
28 bool verifyModule(const Module *M);
29
30 // verifyMethod - Check a method for errors, useful for use when debugging a
31 // pass.
32 bool verifyMethod(const Function *M);
33
34 #endif